/* Connection flow only; inherit the existing monitoring palette and type. */
.fx-connection[hidden] { display: none !important; }
.fx-connection {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    color: var(--text-primary);
    text-align: left;
}
#connection-container { padding: 0 !important; }
section.monitoring-section.mode-connection { padding: 96px 20px 48px !important; }
body.connection-active .faq-section { display: none; }
.fx-connection button, .fx-connection a { -webkit-tap-highlight-color: transparent; }
.fx-connection button { font: inherit; cursor: pointer; }
.fx-connection button:disabled { cursor: wait; opacity: .65; }
.fx-connection button:focus-visible, .fx-connection a:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.fx-connection__back {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
    padding: 0; border: 0; background: none; color: var(--gold); font-size: 13px !important;
}
.fx-connection__heading { margin: 16px 0 28px; text-align: center; }
.fx-connection__eyebrow { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.fx-connection__heading h1 { margin: 12px 0; font-size: clamp(25px, 3vw, 32px); letter-spacing: -.04em; line-height: 1.2; text-wrap: balance; }
.fx-connection__heading p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.fx-connection__steps { display: flex; justify-content: center; gap: 28px; margin-bottom: 28px; list-style: none; padding: 0; }
.fx-connection__steps li { display: flex; align-items: center; gap: 9px; color: var(--text-secondary); font-size: 12px; }
.fx-connection__steps li > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border-color); border-radius: 50%; font-size: 12px; font-weight: 600; }
.fx-connection__steps .is-current { color: var(--gold); }
.fx-connection__steps .is-current > span { border-color: var(--gold); background: rgba(251,191,36,.05); }
.fx-connection__steps .is-complete { color: var(--positive); }
.fx-connection__panel { padding: 30px; background: var(--card-bg, #10121b); border: 1px solid var(--border-color); border-radius: 14px; }
.fx-connection h2 { margin: 0 0 9px; font-size: 21px; letter-spacing: -.03em; line-height: 1.35; }
.fx-connection__intro { color: var(--text-secondary); font-size: 13px; line-height: 1.7; margin: 0 0 24px; }
.fx-connection__platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fx-connection__platform {
    position: relative; min-width: 0; padding: 22px; border: 1px solid var(--border-color); border-radius: 11px;
    background: transparent; text-align: left; color: var(--text-primary); transition: background .2s, border-color .2s;
}
.fx-connection__platform:hover { background: rgba(255,255,255,.025); border-color: rgba(251,191,36,.45); }
.fx-connection__platform[aria-checked="true"] { border-color: var(--gold); background: rgba(251,191,36,.04); }
.fx-connection__platform-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(251,191,36,.08); color: var(--gold); margin-bottom: 18px; }
.fx-connection__platform-icon svg { width: 22px; height: 22px; }
.fx-connection__radio { position: absolute; top: 25px; right: 23px; width: 15px; height: 15px; border: 2px solid var(--gold); border-radius: 50%; }
.fx-connection__platform[aria-checked="true"] .fx-connection__radio { background: var(--gold); }
.fx-connection__platform strong { display: block; font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.fx-connection__platform small { display: block; font-size: 12px; color: var(--text-secondary); }
.fx-connection__note { margin-top: 22px; padding: 12px 14px; border: 1px solid rgba(251,191,36,.12); border-radius: 8px; background: rgba(251,191,36,.025); color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.fx-connection__actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.fx-connection__actions--end { justify-content: flex-end; }
.fx-connection__primary, .fx-connection__secondary, .fx-connection__download {
    display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; padding: 11px 18px;
    border: 1px solid transparent; border-radius: 8px; font-size: 13px !important; font-weight: 700 !important;
    text-decoration: none; transition: background .2s, transform .2s;
}
.fx-connection__primary { background: var(--gold); color: #0a0a0a; }
.fx-connection__primary:hover { background: #ffd15a; }
.fx-connection__secondary, .fx-connection__download { border-color: var(--border-color); background: transparent; color: var(--text-primary); }
.fx-connection__secondary:hover, .fx-connection__download:hover { background: rgba(255,255,255,.05); }
.fx-connection__primary:active, .fx-connection__secondary:active, .fx-connection__download:active { transform: translateY(1px); }
.fx-connection__setup { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.fx-connection__instructions { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; counter-reset: instruction; }
.fx-connection__instructions li { position: relative; padding-left: 37px; counter-increment: instruction; }
.fx-connection__instructions li::before { content: counter(instruction); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--border-color); border-radius: 50%; color: var(--gold); font-size: 12px; }
.fx-connection__instructions h3 { margin: 2px 0 8px; font-size: 14px; line-height: 1.5; }
.fx-connection__instructions p { margin: 0; color: var(--text-secondary); font-size: 12px; line-height: 1.8; }
.fx-connection__instructions code { color: var(--text-primary); font-size: 12px; word-break: break-word; }
.fx-connection__download { margin-top: 12px; padding: 9px 13px; font-size: 12px !important; }
.fx-connection__key { padding: 22px; border: 1px solid var(--border-color); border-radius: 10px; background: rgba(255,255,255,.015); min-width: 0; }
.fx-connection__key h3 { margin: 14px 0 8px; font-size: 15px; line-height: 1.5; }
.fx-connection__key p { color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.fx-connection__key-value { display: block; padding: 13px; margin: 18px 0 14px; background: rgba(255,255,255,.025); border: 1px solid var(--border-color); border-radius: 7px; color: var(--gold); font: 12px/1.7 ui-monospace, monospace; overflow-wrap: anywhere; user-select: all; }
.fx-connection__key .fx-connection__primary { width: 100%; }
.fx-connection__key .fx-connection__key-footnote { margin-top: 12px; font-size: 10px; }
.fx-connection__text-button { min-height: 44px; padding: 8px 0; background: none; border: 0; color: var(--gold); font-size: 11px !important; text-align: left; }
.fx-connection__status { color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
.fx-connection__status[data-tone="error"] { color: #f87171; }
.fx-connection__waiting { padding: 10px 12px; text-align: center; }
.fx-connection__waiting-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 20px; border: 1px solid rgba(251,191,36,.2); border-radius: 13px; color: var(--gold); background: rgba(251,191,36,.04); }
.fx-connection__waiting-icon svg { width: 26px; height: 26px; }
.fx-connection__waiting p { max-width: 480px; margin: 10px auto 20px; color: var(--text-secondary); font-size: 13px; line-height: 1.8; }
.fx-connection__connection-state { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; background: rgba(251,191,36,.04); border-radius: 7px; color: var(--gold); font-size: 12px; }
.fx-connection__connection-state::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fx-connection__waiting.is-success .fx-connection__waiting-icon, .fx-connection__waiting.is-success .fx-connection__connection-state { color: var(--positive); }
@media (max-width: 640px) {
    section.monitoring-section.mode-connection { padding: 76px 14px 32px !important; }
    .monitoring-section.mode-connection > .container { width: 100%; }
    .fx-connection__heading { margin: 14px 0 22px; }
    .fx-connection__heading h1 { font-size: 25px; }
    .fx-connection__heading p { font-size: 12px; }
    .fx-connection__steps { gap: 12px; justify-content: space-between; margin-bottom: 22px; }
    .fx-connection__steps li { flex-direction: column; gap: 6px; text-align: center; font-size: 10px; }
    .fx-connection__panel { padding: 20px 16px; }
    .fx-connection h2 { font-size: 18px; }
    .fx-connection__platforms { gap: 10px; }
    .fx-connection__platform { padding: 16px 12px; }
    .fx-connection__platform-icon { margin-bottom: 16px; width: 36px; height: 36px; }
    .fx-connection__radio { top: 21px; right: 12px; width: 12px; height: 12px; }
    .fx-connection__platform strong { font-size: 15px; }
    .fx-connection__platform small { font-size: 10px; }
    .fx-connection__setup { grid-template-columns: 1fr; gap: 24px; }
    .fx-connection__key { order: -1; padding: 18px; }
    .fx-connection__actions { align-items: stretch; }
    .fx-connection__actions .fx-connection__primary { flex: 1; }
    .fx-connection__primary, .fx-connection__secondary { padding: 11px 12px; font-size: 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .fx-connection button, .fx-connection a { transition: none; }
}
