.ffm-site {
    --ffm-bg: #071014;
    --ffm-panel: #101b21;
    --ffm-panel-strong: #16262d;
    --ffm-text: #eef8fb;
    --ffm-muted: #9eb5bd;
    --ffm-line: rgba(255,255,255,0.12);
    --ffm-accent: #38bdf8;
    --ffm-accent-strong: #0ea5e9;
    --ffm-radius: 8px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100vw - 32px), 1760px);
    max-width: none;
    padding: 16px;
    color: var(--ffm-text);
    background: var(--ffm-bg);
    border: 1px solid var(--ffm-line);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ffm-site[data-ffm-theme="sky"] {
    --ffm-bg: #e9f8ff;
    --ffm-panel: #ffffff;
    --ffm-panel-strong: #d9f1fb;
    --ffm-text: #102631;
    --ffm-muted: #496674;
    --ffm-line: rgba(16,38,49,0.16);
    --ffm-accent: #0284c7;
    --ffm-accent-strong: #0369a1;
}

.ffm-site[data-ffm-theme="sunrise"] {
    --ffm-bg: #21120f;
    --ffm-panel: #321d19;
    --ffm-panel-strong: #462821;
    --ffm-text: #fff7ed;
    --ffm-muted: #e4b7a2;
    --ffm-line: rgba(255,247,237,0.16);
    --ffm-accent: #f97316;
    --ffm-accent-strong: #ea580c;
}

.ffm-site[data-ffm-theme="contrast"] {
    --ffm-bg: #000000;
    --ffm-panel: #111111;
    --ffm-panel-strong: #1f1f1f;
    --ffm-text: #ffffff;
    --ffm-muted: #d4d4d4;
    --ffm-line: rgba(255,255,255,0.28);
    --ffm-accent: #facc15;
    --ffm-accent-strong: #eab308;
}

.ffm-site * {
    box-sizing: border-box;
}

.ffm-hero {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
    gap: 24px;
    align-items: stretch;
}

.ffm-hero__content,
.ffm-route-board,
.ffm-panel,
.ffm-auth-panel {
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
    border-radius: var(--ffm-radius);
}

.ffm-hero__content {
    display: grid;
    grid-template-columns: minmax(300px, 0.88fr) minmax(360px, 1fr);
    gap: clamp(22px, 3vw, 44px);
    align-items: center;
    padding: clamp(22px, 3.5vw, 48px);
}

.ffm-hero-visual {
    min-height: 420px;
    margin: 0;
    overflow: hidden;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 8px;
}

.ffm-hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.ffm-hero__text {
    align-self: center;
}

.ffm-kicker {
    margin: 0 0 10px;
    color: var(--ffm-accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ffm-brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ffm-brand-lockup img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.ffm-brand-lockup .ffm-kicker {
    margin: 0;
}

.ffm-hero h1,
.ffm-auth-panel h1 {
    max-width: 980px;
    margin: 0;
    font-size: clamp(34px, 4.6vw, 68px);
    line-height: 1;
    letter-spacing: 0;
}

.ffm-hero__copy {
    max-width: 660px;
    margin: 22px 0 0;
    color: var(--ffm-muted);
    font-size: 18px;
    line-height: 1.6;
}

.ffm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.ffm-button,
.ffm-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 6px;
    border: 1px solid var(--ffm-line);
    padding: 0 18px;
    color: var(--ffm-text);
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

.ffm-button--primary {
    background: var(--ffm-accent);
    color: var(--ffm-bg);
    border-color: transparent;
}

.ffm-button--ghost {
    background: transparent;
}

.ffm-button--small {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
}

.ffm-route-board {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ffm-route-board__header,
.ffm-route,
.ffm-list__item,
.ffm-panel__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.ffm-route-board__header {
    padding: 8px 4px 16px;
    color: var(--ffm-muted);
    border-bottom: 1px solid var(--ffm-line);
}

.ffm-route {
    min-height: 72px;
    padding: 16px;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-route-board__footer {
    margin-top: auto;
    padding: 16px;
    color: var(--ffm-muted);
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-route-board__footer span,
.ffm-route-board__footer strong {
    display: block;
}

.ffm-route-board__footer strong {
    margin-top: 6px;
    color: var(--ffm-text);
}

.ffm-route span,
.ffm-list__item span {
    font-weight: 800;
}

.ffm-route em,
.ffm-status {
    color: var(--ffm-accent);
    font-style: normal;
    font-weight: 800;
}

.ffm-public-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.ffm-role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.ffm-role-panel {
    padding: 24px;
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
    border-radius: var(--ffm-radius);
}

.ffm-role-panel h2 {
    margin: 0;
    color: var(--ffm-text);
    font-size: 30px;
    line-height: 1.1;
}

.ffm-role-panel ul {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.ffm-role-panel li {
    padding: 12px;
    color: var(--ffm-muted);
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-public-card,
.ffm-launch-band {
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
    border-radius: var(--ffm-radius);
    padding: 22px;
}

.ffm-public-card h2,
.ffm-launch-band h2 {
    margin: 0;
    color: var(--ffm-text);
    font-size: 26px;
    line-height: 1.12;
    letter-spacing: 0;
}

.ffm-public-card p,
.ffm-launch-band p {
    color: var(--ffm-muted);
    line-height: 1.6;
}

.ffm-launch-band {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 16px;
}

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

.ffm-step-list div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-step-list strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--ffm-accent);
    color: var(--ffm-bg);
}

.ffm-step-list span {
    font-weight: 800;
}

.ffm-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    min-height: 72vh;
}

.ffm-sidebar {
    position: sticky;
    top: 32px;
    height: calc(100vh - 64px);
    padding: 22px;
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
    border-radius: var(--ffm-radius);
}

.ffm-sidebar h1,
.ffm-panel h2 {
    margin: 0;
    letter-spacing: 0;
}

.ffm-nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.ffm-nav a {
    padding: 12px;
    color: var(--ffm-text);
    text-decoration: none;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-panel-stack {
    display: grid;
    gap: 16px;
}

.ffm-panel,
.ffm-auth-panel {
    padding: 22px;
}

.ffm-stat-grid,
.ffm-theme-grid,
.ffm-pipeline,
.ffm-action-grid {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.ffm-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ffm-theme-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ffm-stat,
.ffm-theme-option {
    min-height: 96px;
    padding: 16px;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
    color: var(--ffm-text);
}

.ffm-stat span,
.ffm-theme-option em {
    display: block;
    color: var(--ffm-muted);
    font-style: normal;
}

.ffm-stat strong {
    display: block;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.ffm-pipeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ffm-pipeline-step,
.ffm-action-card,
.ffm-template-strip button {
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-pipeline-step {
    min-height: 82px;
    padding: 14px;
}

.ffm-pipeline-step span,
.ffm-action-card span,
.ffm-action-card em {
    display: block;
    color: var(--ffm-muted);
}

.ffm-pipeline-step strong {
    display: block;
    margin-top: 8px;
    color: var(--ffm-accent);
    font-size: 28px;
    line-height: 1;
}

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

.ffm-action-card {
    display: grid;
    gap: 7px;
    min-height: 116px;
    padding: 16px;
    color: var(--ffm-text);
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.ffm-action-card strong {
    font-size: 18px;
}

.ffm-action-card em {
    font-style: normal;
    line-height: 1.45;
}

button.ffm-action-card {
    font: inherit;
}

.ffm-template-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.ffm-template-strip button {
    min-height: 40px;
    padding: 0 14px;
    color: var(--ffm-text);
    font-weight: 800;
    cursor: pointer;
}

.ffm-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.ffm-trip-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.ffm-contact-shell {
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 0.65fr) minmax(360px, 0.55fr);
    gap: 16px;
    align-items: stretch;
}

.ffm-contact-shell .ffm-panel:first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ffm-contact-shell h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(36px, 5vw, 72px);
    line-height: 0.98;
    letter-spacing: 0;
}

.ffm-contact-form {
    display: grid;
    align-content: center;
    gap: 14px;
}

.ffm-contact-form label {
    display: grid;
    gap: 7px;
    color: var(--ffm-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ffm-contact-form input,
.ffm-contact-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--ffm-text);
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-contact-form textarea {
    resize: vertical;
}

.ffm-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ffm-trip-form label {
    display: grid;
    gap: 7px;
    color: var(--ffm-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ffm-trip-form input,
.ffm-trip-form select,
.ffm-trip-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--ffm-text);
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-trip-form textarea {
    resize: vertical;
}

.ffm-field-wide {
    grid-column: 1 / -1;
}

.ffm-form-message {
    min-height: 20px;
    margin: 0;
    color: var(--ffm-accent);
    font-weight: 800;
}

.ffm-trip-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.ffm-trip-tools,
.ffm-filter-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.32fr) minmax(150px, 0.32fr) auto auto;
    gap: 10px;
    align-items: end;
    margin-top: 18px;
    padding: 12px;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-trip-tools label,
.ffm-filter-tools label {
    display: grid;
    gap: 7px;
    color: var(--ffm-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ffm-trip-tools input,
.ffm-trip-tools select,
.ffm-filter-tools input,
.ffm-filter-tools select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    color: var(--ffm-text);
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-trip-tools span,
.ffm-filter-tools span {
    align-self: center;
    color: var(--ffm-muted);
    font-weight: 800;
    white-space: nowrap;
}

.ffm-trip-card,
.ffm-empty {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    min-height: 72px;
    padding: 14px;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-status-select {
    min-height: 38px;
    max-width: 170px;
    padding: 8px 10px;
    color: var(--ffm-text);
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-trip-card strong,
.ffm-trip-card span {
    display: block;
}

.ffm-trip-card span,
.ffm-empty {
    color: var(--ffm-muted);
}

.ffm-trip-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 8px;
    margin: 10px 0 0;
}

.ffm-trip-details div {
    padding: 8px;
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-trip-details dt {
    color: var(--ffm-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ffm-trip-details dd {
    margin: 4px 0 0;
    color: var(--ffm-text);
    font-weight: 800;
}

.ffm-trip-note {
    margin: 10px 0 0;
    color: var(--ffm-muted);
}

.ffm-status-badge {
    display: inline-flex;
    width: fit-content;
    margin: 7px 0;
    padding: 4px 8px;
    color: var(--ffm-bg);
    background: var(--ffm-accent);
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.ffm-status-badge--archived {
    color: var(--ffm-text);
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
}

.ffm-quote-box {
    margin-top: 10px;
    padding: 12px;
    background: var(--ffm-panel);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-quote-box strong {
    color: var(--ffm-accent);
}

.ffm-quote-box p {
    margin: 8px 0 0;
    color: var(--ffm-muted);
}

.ffm-quote-link {
    width: fit-content;
    margin-top: 10px;
}

.ffm-timeline {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.ffm-timeline-event,
.ffm-itinerary-item,
.ffm-document-item {
    position: relative;
    padding: 14px;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-timeline-event strong,
.ffm-timeline-event span,
.ffm-itinerary-item strong,
.ffm-itinerary-item span,
.ffm-document-item strong,
.ffm-document-item span {
    display: block;
}

.ffm-timeline-event span,
.ffm-timeline-event p,
.ffm-itinerary-item span,
.ffm-itinerary-item p,
.ffm-itinerary-item em,
.ffm-document-item span {
    color: var(--ffm-muted);
}

.ffm-timeline-event p,
.ffm-itinerary-item p {
    margin: 8px 0 0;
}

.ffm-itinerary-list,
.ffm-document-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.ffm-itinerary-item em {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 4px 8px;
    border: 1px solid var(--ffm-line);
    border-radius: 999px;
    font-style: normal;
}

.ffm-document-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px 12px;
    align-items: center;
}

.ffm-document-item span {
    grid-column: 1;
}

.ffm-document-item .ffm-button {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.ffm-document-item .ffm-icon-button {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.ffm-itinerary-item .ffm-icon-button {
    position: absolute;
    top: 12px;
    right: 12px;
}

.ffm-icon-button--danger {
    background: transparent;
    color: var(--ffm-text);
    border-color: var(--ffm-line);
}

.ffm-list__item {
    min-height: 64px;
    padding: 14px;
    background: var(--ffm-panel-strong);
    border: 1px solid var(--ffm-line);
    border-radius: 6px;
}

.ffm-icon-button {
    width: 38px;
    min-height: 38px;
    padding: 0;
    background: var(--ffm-accent);
    color: var(--ffm-bg);
}

.ffm-theme-option {
    text-align: left;
    cursor: pointer;
}

.ffm-theme-option[aria-pressed="true"] {
    outline: 3px solid var(--ffm-accent);
    outline-offset: 2px;
}

.ffm-swatch {
    display: block;
    width: 42px;
    height: 22px;
    margin-bottom: 10px;
    border-radius: 999px;
    border: 1px solid var(--ffm-line);
}

.ffm-swatch--dark { background: linear-gradient(90deg, #071014, #38bdf8); }
.ffm-swatch--sky { background: linear-gradient(90deg, #e9f8ff, #0284c7); }
.ffm-swatch--sunrise { background: linear-gradient(90deg, #21120f, #f97316); }
.ffm-swatch--contrast { background: linear-gradient(90deg, #000, #facc15); }

.ffm-auth-panel {
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(320px, 0.55fr);
    gap: 24px;
    align-items: center;
}

.ffm-footer {
    padding: 18px 4px 2px;
    color: var(--ffm-muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 900px) {
    .ffm-site {
        width: min(calc(100vw - 20px), 1760px);
        padding: 10px;
    }

    .ffm-hero,
    .ffm-hero__content,
    .ffm-shell,
    .ffm-auth-panel,
    .ffm-contact-shell,
    .ffm-public-grid,
    .ffm-role-grid,
    .ffm-launch-band,
    .ffm-step-list {
        grid-template-columns: 1fr;
    }

    .ffm-sidebar {
        position: static;
        height: auto;
    }

    .ffm-stat-grid,
    .ffm-theme-grid,
    .ffm-form-grid,
    .ffm-pipeline,
    .ffm-action-grid,
    .ffm-trip-details,
    .ffm-trip-tools,
    .ffm-filter-tools,
    .ffm-document-item {
        grid-template-columns: 1fr;
    }

    .ffm-document-item span,
    .ffm-document-item .ffm-button,
    .ffm-document-item .ffm-icon-button {
        grid-column: auto;
        grid-row: auto;
    }

    .ffm-hero h1,
    .ffm-auth-panel h1 {
        font-size: 42px;
    }

    .ffm-hero-visual,
    .ffm-hero-visual img {
        min-height: 260px;
    }
}

@media print {
    .ffm-site {
        left: auto;
        width: 100%;
        padding: 0;
        color: #111111;
        background: #ffffff;
        border: 0;
        transform: none;
    }

    .ffm-sidebar,
    .ffm-trip-form,
    .ffm-filter-tools,
    .ffm-trip-tools,
    .ffm-action-grid,
    .ffm-icon-button,
    .ffm-status-select,
    .ffm-button {
        display: none !important;
    }

    .ffm-shell,
    .ffm-panel-stack {
        display: block;
    }

    .ffm-panel,
    .ffm-trip-card,
    .ffm-timeline-event,
    .ffm-itinerary-item,
    .ffm-document-item {
        break-inside: avoid;
        color: #111111;
        background: #ffffff;
        border-color: #cccccc;
    }
}
