/* Voltech Fixture Designer — visual redesign (Designer Redesign / "Fixture Designer (standalone)").
   Only presentation lives here: every spec control keeps its original id, range and behaviour. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
    --fd-ink: #15171C;
    --fd-ink-2: #3A3E47;
    --fd-muted: #6B7079;
    --fd-faint: #9A9EA6;
    --fd-line: #E4E4DF;
    --fd-line-soft: #EEEEEA;
    --fd-field: #D6D7D1;
    --fd-wash: #F3F3F0;
    --fd-canvas: #FAFAF8;
    --fd-blue: #1F4FD1;
    --fd-blue-hover: #1A43B3;
    --fd-blue-soft: #F6F8FE;
    --fd-blue-tint: #E8EEFC;
    --fd-blue-line: #B9C8F2;
    --fd-danger: #B3302A;
    --fd-red: #D13B2F;
    --fd-ok: #16874A;
    --fd-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --fd-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── Page shell (header + footer) ─────────────────────────────────────────── */
body.fd-body {
    background: var(--fd-wash) !important;
    color: var(--fd-ink) !important;
    font-family: var(--fd-sans) !important;
    -webkit-font-smoothing: antialiased;
}

.fd-body .main-content { padding-bottom: 0; }

.header-navbar.fd-nav {
    min-height: 56px;
    padding: 0 !important;
    background: var(--fd-ink) !important;
    box-shadow: none !important;
    border-bottom: 0 !important;
}

.fd-nav .container-fluid { min-height: 56px; padding: 0 20px !important; align-items: stretch; }
.fd-nav .navbar-collapse { align-items: stretch; }

.fd-nav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 12px;
    font: 700 15px/1 var(--fd-sans) !important;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff !important;
}

.fd-nav .fd-brand-sub {
    padding-left: 12px;
    border-left: 1px solid var(--fd-ink-2);
    font: 500 13px/1 var(--fd-sans);
    letter-spacing: 0;
    text-transform: none;
    color: #B9BDC6;
}

.fd-nav .navbar-nav { align-items: stretch; gap: 4px !important; }
.fd-nav .nav-item { display: flex; }

.fd-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0 12px !important;
    min-height: 56px;
    color: var(--fd-faint) !important;
    font: 500 13px var(--fd-sans) !important;
    border-bottom: 0 !important;
    white-space: nowrap;
    transition: color .15s ease, box-shadow .15s ease;
}

.fd-nav .nav-link:hover { color: #fff !important; border-bottom: 0 !important; }
.fd-nav .nav-link.active { color: #fff !important; box-shadow: inset 0 -2px 0 #6F93F2; border-bottom: 0 !important; }

.fd-nav .nav-link.fd-login-pill {
    align-self: center;
    min-height: 32px;
    height: 32px;
    padding: 0 14px !important;
    background: #fff;
    color: var(--fd-ink) !important;
    border-radius: 6px;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.fd-nav .nav-link.fd-login-pill:hover { background: #E9EAEC; }
.fd-nav .nav-link.fd-portal-link { color: #F2C66D !important; }

.fd-nav .navbar-toggler { align-self: center; border-color: rgba(255, 255, 255, .2); }

.fd-body .footer {
    background: transparent !important;
    color: var(--fd-faint) !important;
    border-top: 0 !important;
    padding: 16px 20px !important;
    font: 400 12px var(--fd-sans);
}

.fd-body .footer .container { max-width: none; text-align: left !important; padding: 0; }

@media (max-width: 991px) {
    .fd-nav .container-fluid { flex-wrap: wrap; }
    .fd-nav .navbar-collapse { padding-bottom: 12px; }
    .fd-nav .nav-link { min-height: 40px; }
    .fd-nav .nav-link.active { box-shadow: inset 2px 0 0 #6F93F2; }
}

/* ── Designer layout ──────────────────────────────────────────────────────── */
.fd-app {
    display: flex;
    flex-direction: column;
    color: var(--fd-ink);
    font-family: var(--fd-sans);
}

.fd-steps-bar {
    background: #fff;
    border-bottom: 1px solid var(--fd-line);
    padding: 0 20px;
    overflow-x: auto;
}

.fd-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    height: 52px;
    min-width: max-content;
}

.fd-steps li { display: flex; align-items: center; gap: 10px; padding-right: 14px; }

.fd-steps .fd-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font: 600 11px var(--fd-mono);
    background: #fff;
    color: var(--fd-faint);
    box-shadow: inset 0 0 0 1.5px var(--fd-field);
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.fd-steps .fd-step-label { font: 500 13px var(--fd-sans); color: var(--fd-faint); white-space: nowrap; transition: color .2s ease; }
.fd-steps .fd-rule { width: 36px; height: 1px; background: var(--fd-field); margin-left: 4px; }
.fd-steps li:last-child .fd-rule { display: none; }

.fd-steps li.is-current .fd-dot { color: var(--fd-blue); box-shadow: inset 0 0 0 1.5px var(--fd-blue); }
.fd-steps li.is-current .fd-step-label,
.fd-steps li.is-done .fd-step-label { color: var(--fd-ink); }
.fd-steps li.is-done .fd-dot { background: var(--fd-blue); color: #fff; box-shadow: none; }

.fd-main {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    align-items: flex-start;
}

.fd-aside {
    flex: 1 1 300px;
    max-width: 360px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fd-rail {
    flex: 1 1 280px;
    max-width: 340px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 16px;
}

.fd-card {
    background: #fff;
    border: 1px solid var(--fd-line);
    border-radius: 10px;
}

.fd-card-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--fd-line-soft);
}

.fd-card-t { display: flex; align-items: center; gap: 10px; min-width: 0; }

.fd-card-h h2 {
    margin: 0;
    font: 600 14px var(--fd-sans);
    color: var(--fd-ink);
    text-transform: none;
    letter-spacing: 0;
}

.fd-num { font: 600 11px var(--fd-mono); color: var(--fd-faint); }
.fd-tag { font: 400 12px var(--fd-sans); color: var(--fd-faint); white-space: nowrap; }

.fd-card-b { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.fd-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.fd-span-2 { grid-column: 1 / -1; }

.fd-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.fd-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    font: 500 12px var(--fd-sans);
    color: var(--fd-muted);
}

.fd-app .limit-restriction { font: 400 11px var(--fd-sans) !important; color: var(--fd-faint) !important; }

.fd-input {
    display: flex;
    align-items: center;
    height: 36px;
    border: 1px solid var(--fd-field);
    border-radius: 6px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.fd-input:focus-within { border-color: var(--fd-blue); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); }

.fd-input input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 10px;
    font: 500 14px var(--fd-mono);
    background: transparent;
    color: var(--fd-ink);
}

.fd-input .unit-label,
.fd-input .fd-unit { padding: 0 10px; font: 400 12px var(--fd-mono); color: var(--fd-faint); white-space: nowrap; }

.fd-input input:disabled { color: var(--fd-faint); }

.fd-app input[type="range"] {
    width: 100%;
    height: 18px;
    margin: 0;
    accent-color: var(--fd-blue);
    cursor: pointer;
}

.fd-seg {
    display: inline-flex;
    background: var(--fd-wash);
    border-radius: 6px;
    padding: 2px;
    flex: none;
}

.fd-seg button,
.fd-seg label {
    position: relative;
    display: flex;
    align-items: center;
    height: 24px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--fd-muted);
    font: 500 12px var(--fd-mono);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.fd-seg input { position: absolute; opacity: 0; pointer-events: none; }
.fd-seg button:hover,
.fd-seg label:hover { color: var(--fd-ink); }

.fd-seg label:has(input:checked),
.fd-seg button.is-on {
    background: #fff;
    color: var(--fd-ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.fd-seg-lg { padding: 3px; border-radius: 7px; }
.fd-seg-lg button { height: 30px; padding: 0 14px; border-radius: 5px; font: 500 13px var(--fd-sans); }
.fd-seg-lg.fd-seg-mono button { padding: 0 12px; font: 500 12px var(--fd-mono); }

.fd-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--fd-wash);
    border-radius: 6px;
    font: 400 12px var(--fd-sans);
    color: var(--fd-muted);
}

.fd-stat-v { font: 600 12px var(--fd-sans); color: var(--fd-ink); text-align: right; }
.fd-stat-v.mono { font: 600 13px var(--fd-mono); }

.fd-app #type-badge {
    padding: 0;
    margin: 0;
    background: none !important;
    border: 0 !important;
    font: 600 12px var(--fd-sans);
    color: var(--fd-ink) !important;
    text-transform: none;
    letter-spacing: 0;
}

.fd-note { margin: 0; font: 400 12px/1.5 var(--fd-sans); color: var(--fd-muted); }
.fd-note-sm { margin: 0; font: 400 11px/1.5 var(--fd-sans); color: var(--fd-faint); }

.fd-app .pin-constraint-note {
    padding: 8px 10px;
    border: 1px solid #F0CFCB;
    border-radius: 6px;
    background: #FDF4F3;
    color: #7A2E2A;
    font: 400 12px/1.45 var(--fd-sans);
}

.fd-palette {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1.5px dashed var(--fd-blue-line);
    border-radius: 8px;
    background: var(--fd-blue-soft);
    cursor: grab;
    user-select: none;
    min-width: 0;
    text-align: left;
    color: var(--fd-ink);
    transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
}

.fd-palette:hover { border-color: var(--fd-blue); }
.fd-palette:active { cursor: grabbing; transform: scale(.99); }
.fd-palette-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fd-palette-t b { font: 600 12px var(--fd-sans); color: var(--fd-ink); }
.fd-palette-t span { font: 400 11px/1.3 var(--fd-sans); color: var(--fd-muted); }

.fd-chip {
    height: 28px;
    min-width: 40px;
    padding: 0 10px;
    border-radius: 14px;
    border: 1px solid var(--fd-field);
    background: #fff;
    color: var(--fd-ink-2);
    font: 500 12px var(--fd-mono);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.fd-chip:hover { border-color: var(--fd-blue); }
.fd-chip.is-on { border-color: var(--fd-blue); background: var(--fd-blue-tint); color: var(--fd-blue); }
.fd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fd-chips:empty { display: none; }

.fd-danger-btn {
    height: 32px;
    border: 1px solid #F0CFCB;
    background: #FDF4F3;
    color: var(--fd-danger);
    border-radius: 6px;
    font: 500 13px var(--fd-sans);
    cursor: pointer;
    transition: background-color .15s ease;
}

.fd-danger-btn:hover { background: #FBE7E5; }

/* ── Canvas card ──────────────────────────────────────────────────────────── */
.fd-canvas {
    flex: 999 1 520px;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--fd-line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-height: 660px;
    overflow: hidden;
}

/* The drawing fills the screen height on anything wider than a phone (header 56 + steps bar 52 +
   page padding 32 = 140 px above / below it), never shorter than before. */
@media (min-width: 721px) {
    .fd-canvas { min-height: max(660px, calc(100vh - 140px)); min-height: max(660px, calc(100dvh - 140px)); }
}

/* Fullscreen (canvas toolbar ⛶ button): just the drawing card, edge to edge. */
.fd-app .fd-canvas:fullscreen { height: 100vh; min-height: 0; border: 0; border-radius: 0; }
.fd-app .fd-canvas:fullscreen .fd-canvas-stage,
.fd-app .fd-canvas:fullscreen #designer-container { min-height: 0 !important; }
.fd-fullscreen-btn { font-size: 15px; line-height: 1; padding: 0 10px; }
.fd-fullscreen-btn[aria-pressed="true"] { border-color: var(--fd-blue); background: var(--fd-blue-tint); color: var(--fd-blue); }

.fd-canvas-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--fd-line-soft);
    flex-wrap: wrap;
}

.fd-canvas-title { font: 600 13px var(--fd-sans); padding: 0 6px 0 4px; }
.fd-vr { width: 1px; height: 20px; background: var(--fd-line); margin: 0 2px; }
.fd-flex { flex: 1; }
.fd-canvas-stat { font: 500 12px var(--fd-mono); color: var(--fd-muted); white-space: nowrap; }

.fd-ghost-btn {
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--fd-field);
    background: #fff;
    border-radius: 6px;
    font: 500 13px var(--fd-sans);
    color: var(--fd-ink-2);
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.fd-ghost-btn:hover { border-color: var(--fd-blue); color: var(--fd-blue); }

.fd-app .fd-ghost-btn.btn-wire-active {
    border-color: var(--fd-blue);
    background: var(--fd-blue-tint);
    color: var(--fd-blue);
}

.fd-canvas-stage {
    position: relative;
    flex: 1;
    display: flex;
    min-height: 560px;
    overflow: hidden;
    background-color: var(--fd-canvas);
    background-image: radial-gradient(#DADBD5 1px, transparent 1px);
    background-size: 16px 16px;
}

.fd-app #designer-container {
    position: relative;
    flex: 1;
    width: 100% !important;
    height: auto !important;
    min-height: 560px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: hidden;
}

.fd-app #designer-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fd-app #pogo-editor { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.fd-app .fd-node { transition: stroke .15s ease, fill .15s ease; }
.fd-app .fd-node:hover { stroke: var(--fd-blue); }

.fd-hint {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 52px;
    padding: 10px 16px;
    border-top: 1px solid var(--fd-line-soft);
    flex-wrap: wrap;
}

.fd-hint-text { flex: 1; min-width: 220px; font: 400 13px/1.5 var(--fd-sans); color: var(--fd-ink-2); }
.fd-hint-text p { margin: 0; }
.fd-legend { display: flex; gap: 14px; font: 400 12px var(--fd-sans); color: var(--fd-muted); }
.fd-legend span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.fd-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.fd-legend i.is-off { border: 1.5px dashed var(--fd-faint); }

/* ── Inline 3D view (an overlay on the drawing, not a full-screen pop-up) ─── */
.fd-app #webgl-container {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    z-index: 5 !important;
    background: #0f131a;
    opacity: 0;
    visibility: hidden;
    transform: scale(.985);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}

.fd-app #webgl-container.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .22s ease, transform .22s ease, visibility 0s;
}

.fd-app #webgl-container canvas { width: 100% !important; height: 100% !important; display: block; }

.fd-3d-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.fd-3d-bar > * { pointer-events: auto; }

.fd-3d-views {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 7px;
    background: rgba(21, 23, 28, .78);
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(6px);
}

.fd-3d-views .view-btn {
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #B9BDC6;
    font: 500 12px var(--fd-sans);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.fd-3d-views .view-btn:hover { color: #fff; }
.fd-3d-views .view-btn.active { background: #fff; color: var(--fd-ink); }

.fd-3d-exit {
    margin-left: auto;
    height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 7px;
    background: rgba(21, 23, 28, .78);
    color: #fff;
    font: 500 12px var(--fd-sans);
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.fd-3d-exit:hover { background: rgba(21, 23, 28, .95); }

#smd-3d-status,
#pogo-3d-status {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    max-width: calc(100% - 24px);
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(21, 23, 28, .78);
    color: #9FE3BD;
    font: 500 12px var(--fd-mono);
    pointer-events: none;
}

#smd-3d-status:empty,
#pogo-3d-status:empty { display: none; }
#smd-3d-status.warn,
#pogo-3d-status.warn { color: #FF9C94; }

.fd-3d-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    color: var(--fd-muted);
    font: 400 11px var(--fd-sans);
    pointer-events: none;
}

/* ── Price rail ───────────────────────────────────────────────────────────── */
.fd-price { padding: 16px 16px 4px; }
.fd-kicker { font: 500 12px var(--fd-sans); color: var(--fd-muted); }
.fd-total { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; font: 600 32px/1.1 var(--fd-sans); letter-spacing: -.01em; }
.fd-total-unit { font: 500 12px var(--fd-mono); color: var(--fd-faint); letter-spacing: 0; }
.fd-avail { margin-top: 4px; font: 400 12px var(--fd-sans); color: var(--fd-muted); }

.fd-app #delivery-address {
    margin: 4px 0 0;
    font: 400 12px var(--fd-sans);
    color: var(--fd-muted) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fd-lines { padding: 12px 16px 4px; }

.fd-app .fd-lines table { width: 100%; border-collapse: collapse; margin: 0; }
.fd-app .fd-lines thead { display: none; }
.fd-app .fd-lines tbody { display: block; }

.fd-app .fd-lines tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 10px 0;
    border-top: 1px solid var(--fd-line-soft);
}

.fd-app .fd-lines td { padding: 0 !important; border: 0 !important; background: transparent !important; text-align: left !important; }
.fd-app .fd-lines td:nth-child(2) { grid-column: 1; grid-row: 1; font: 500 13px/1.35 var(--fd-sans); color: var(--fd-ink); }
.fd-app .fd-lines td:nth-child(5) { grid-column: 2; grid-row: 1; font: 600 13px var(--fd-mono); color: var(--fd-ink); text-align: right !important; }
.fd-app .fd-lines td:nth-child(1) { grid-column: 1; grid-row: 2; font: 400 11px var(--fd-mono); color: var(--fd-faint); }
.fd-app .fd-lines td.fd-calc { grid-column: 2; grid-row: 2; font: 400 11px var(--fd-mono); color: var(--fd-faint); text-align: right !important; white-space: nowrap; }
.fd-app .fd-lines td:nth-child(3),
.fd-app .fd-lines td:nth-child(4),
.fd-app .fd-lines td:nth-child(6):not(.fd-calc) { display: none; }

.fd-actions {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--fd-line-soft);
}

.fd-btn {
    height: 40px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 7px;
    font: 500 14px var(--fd-sans);
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.fd-btn-primary { border: 0; background: var(--fd-blue); color: #fff !important; font-weight: 600; }
.fd-btn-primary:hover { background: var(--fd-blue-hover); }
.fd-btn-secondary { border: 1px solid var(--fd-field); background: #fff; color: var(--fd-ink) !important; }
.fd-btn-secondary:hover { border-color: var(--fd-ink); }
.fd-btn-dark { border: 1px solid var(--fd-ink); background: var(--fd-ink); color: #fff !important; }
.fd-btn-dark:hover { background: #2A2D34; }

.fd-help { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.fd-help-t { font: 600 12px var(--fd-sans); }
.fd-help-g { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font: 400 12px/1.4 var(--fd-sans); color: var(--fd-ink-2); }
.fd-help-g > span:nth-child(odd) { font: 500 11px var(--fd-mono); color: var(--fd-muted); }

/* ── Kelvin holes & fixings ───────────────────────────────────────────────── */
.fd-hole-icon {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, .3);
}

.fd-hole-icon.through { background: #6B7079; }
.fd-hole-icon.blind { background: #9EA3AB; }

.fd-hole-editor { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--fd-line-soft); }
.fd-hole-editor[hidden] { display: none; }
.fd-app #custom-hole-editor[style*="none"] { display: none !important; }

.fd-kinds { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px; background: var(--fd-wash); border-radius: 7px; padding: 3px; }
.fd-kinds button { height: 28px; border: 0; border-radius: 5px; background: transparent; color: var(--fd-muted); font: 500 12px var(--fd-sans); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.fd-kinds button.is-on { background: #fff; color: var(--fd-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

/* ── Legacy SMD / Pogo controls shown in the field style ──────────────────── */
.fd-app .control-group { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; background: transparent; }
.fd-app .control-group > label { margin: 0; font: 500 12px var(--fd-sans); color: var(--fd-muted); }

.fd-app .row-dual { display: flex; flex-direction: column-reverse; gap: 6px; }

.fd-app .row-dual input[type="number"] {
    height: 36px;
    width: 100%;
    padding: 0 10px;
    border: 1px solid var(--fd-field);
    border-radius: 6px;
    outline: 0;
    background: #fff;
    font: 500 14px var(--fd-mono);
    color: var(--fd-ink);
    text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.fd-app .row-dual input[type="number"]:focus { border-color: var(--fd-blue); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); }

.fd-app .smd-meta,
.fd-app .pogo-meta { font: 400 11px/1.4 var(--fd-sans); color: var(--fd-faint); margin: 0; }

.fd-app .smd-status,
.fd-app #status { margin: 0; font: 400 12px/1.5 var(--fd-sans); color: var(--fd-muted); }
.fd-app #status:empty { display: none; }
.fd-app .smd-status.warn { color: var(--fd-danger); }

/* SMD uneven pin pitch: shown once any gap differs from the global pitch */
.fd-app .smd-pitch-custom { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.fd-app .smd-pitch-custom .smd-meta { color: #b45309; }
.fd-app .smd-row-align { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fd-app #designer-svg.smd-move-mode .pin-pad { cursor: ns-resize; }
.fd-app #designer-svg.smd-move-mode .pin-pad.is-dragging { cursor: grabbing; }
.fd-app .smd-pitch-custom[hidden],
.fd-app .smd-row-align[hidden] { display: none; }

.fd-app .pin-palette { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }

.fd-app .pin-set {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1.5px dashed var(--fd-blue-line);
    border-radius: 8px;
    background: var(--fd-blue-soft);
    color: var(--fd-ink);
    font: 600 12px/1.3 var(--fd-sans);
    text-align: left;
    cursor: grab;
    user-select: none;
    transition: border-color .15s ease;
}

.fd-app .pin-set:hover { border-color: var(--fd-blue); }
.fd-app .pin-set:active { cursor: grabbing; }

.fd-app .pogo-props { padding: 12px; border: 1px solid var(--fd-line-soft); border-radius: 8px; background: #fff; }
.fd-app .pogo-props h3 { margin: 0 0 6px; font: 600 12px var(--fd-sans); color: var(--fd-muted); }
.fd-app #pogo-sel-type { font: 600 13px var(--fd-sans); }
.fd-app .pogo-pin-list { margin: 8px 0 0; padding-left: 18px; font: 400 12px var(--fd-mono); color: var(--fd-ink-2); }
.fd-app .pogo-pin-list:empty { display: none; }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.fd-body .modal-overlay { background: rgba(21, 23, 28, .45) !important; }

.fd-body .modal-box {
    max-width: 420px;
    padding: 22px !important;
    border-radius: 12px !important;
    background: #fff;
    color: var(--fd-ink);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25) !important;
    font-family: var(--fd-sans);
}

.fd-body .modal-box h3 { margin: 0 0 12px; font: 600 18px var(--fd-sans) !important; color: var(--fd-ink) !important; text-transform: none; letter-spacing: 0; }
.fd-body .modal-box h3 .fa { display: none; }

.fd-body .modal-box input[type="text"] {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--fd-field);
    border-radius: 6px;
    font: 400 14px var(--fd-sans);
    outline-color: var(--fd-blue);
}

.fd-body .modal-box .btn { height: 38px; border-radius: 7px; font: 500 14px var(--fd-sans); }
.fd-body .modal-box .btn-primary { background: var(--fd-blue); border-color: var(--fd-blue); }
.fd-body .modal-box .btn-secondary { background: #fff; border: 1px solid var(--fd-field); color: var(--fd-ink); }

/* ── Start page (fixture finder) ──────────────────────────────────────────── */
.ff { display: flex; justify-content: center; padding: 48px 20px 64px; }
.ff-wrap { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 28px; }
.ff[data-mode="ask"] .ff-result,
.ff[data-mode="result"] .ff-ask { display: none; }
.ff-ask, .ff-result { display: flex; flex-direction: column; gap: 28px; animation: ffIn .25s ease both; }
@keyframes ffIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ff-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ff-eyebrow { font: 600 11px var(--fd-mono); letter-spacing: .08em; color: var(--fd-blue); }
.ff-link { font: 500 13px var(--fd-sans); color: var(--fd-blue); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.ff-link:hover { color: var(--fd-blue-hover); text-decoration: underline; }
.ff-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.ff-progress span { height: 4px; border-radius: 2px; background: #DCDDD7; transition: background-color .2s ease; }
.ff-progress span.is-on { background: var(--fd-blue); }

.ff h1 { margin: 0; font: 600 32px/1.2 var(--fd-sans); letter-spacing: -.01em; color: var(--fd-ink); text-wrap: pretty; }
.ff-sub { margin: 8px 0 0; font: 400 15px/1.55 var(--fd-sans); color: var(--fd-muted); }

.ff-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }

.ff-opt {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 10px;
    border: 1.5px solid var(--fd-line);
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.ff-opt:hover { border-color: var(--fd-blue); }
.ff-opt.is-on { border-color: var(--fd-blue); background: var(--fd-blue-soft); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); }
.ff-radio { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid #B5B9C0; display: grid; place-items: center; }
.ff-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.ff-opt.is-on .ff-radio { border-color: var(--fd-blue); }
.ff-opt.is-on .ff-radio::after { background: var(--fd-blue); }
.ff-opt-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ff-opt-t b { font: 600 15px/1.35 var(--fd-sans); color: var(--fd-ink); }
.ff-opt-t span { font: 400 13px/1.5 var(--fd-sans); color: var(--fd-muted); }

.ff-count { background: #fff; border: 1px solid var(--fd-line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.ff-stepper { display: flex; align-items: center; gap: 16px; }
.ff-stepper button { width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--fd-field); background: var(--fd-canvas); font: 500 22px var(--fd-mono); cursor: pointer; }
.ff-stepper button:hover { background: #F0F0EC; }
.ff-count-v { display: flex; align-items: baseline; justify-content: center; gap: 10px; min-width: 140px; }
.ff-count-v b { font: 600 48px/1 var(--fd-mono); }
.ff-count-v span { font: 400 14px var(--fd-sans); color: var(--fd-muted); }
.ff-count .fd-chip { height: 32px; min-width: 44px; padding: 0 12px; border-radius: 16px; font-size: 13px; }

.ff-nav { display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--fd-line); }
.ff-btn { height: 42px; padding: 0 16px; border-radius: 8px; font: 500 14px var(--fd-sans); cursor: pointer; transition: background-color .15s ease, opacity .15s ease; }
.ff-btn:disabled { opacity: .4; cursor: default; }
.ff-btn-ghost { border: 1px solid var(--fd-field); background: #fff; color: var(--fd-ink); }
.ff-btn-text { border: 0; background: transparent; color: var(--fd-muted); padding: 0 12px; }
.ff-btn-text:hover { color: var(--fd-ink); }
.ff-btn-primary { border: 0; background: var(--fd-blue); color: #fff; font-weight: 600; padding: 0 22px; }
.ff-btn-primary:hover:not(:disabled) { background: var(--fd-blue-hover); }

.ff-best { background: #fff; border: 1.5px solid var(--fd-blue); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(31, 79, 209, .08); }
.ff-best-b { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.ff-best-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ff-badge { height: 24px; padding: 0 10px; border-radius: 12px; background: var(--fd-blue); color: #fff; font: 600 11px/24px var(--fd-mono); letter-spacing: .06em; }
.ff-best-name { font: 600 20px var(--fd-sans); }
.ff-best-desc { margin: 0; font: 400 15px/1.55 var(--fd-sans); color: var(--fd-ink-2); }
.ff-reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ff-reasons li { display: flex; gap: 10px; font: 400 14px/1.5 var(--fd-sans); }
.ff-reasons li::before { content: "✓"; flex: none; color: var(--fd-ok); font-weight: 600; }
.ff-best-f { display: flex; align-items: center; gap: 16px; padding: 16px 24px; background: var(--fd-blue-soft); border-top: 1px solid #DCE3F5; flex-wrap: wrap; }
.ff-best-f span { flex: 1; min-width: 200px; font: 400 13px var(--fd-sans); color: var(--fd-ink-2); }
.ff-go { height: 44px; display: flex; align-items: center; padding: 0 22px; background: var(--fd-blue); color: #fff !important; border-radius: 8px; font: 600 14px var(--fd-sans); text-decoration: none !important; white-space: nowrap; transition: background-color .15s ease; }
.ff-go:hover { background: var(--fd-blue-hover); }

.ff-others-t { font: 600 13px var(--fd-sans); color: var(--fd-muted); }
.ff-others { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.ff-other { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: #fff; border: 1px solid var(--fd-line); border-radius: 10px; color: var(--fd-ink) !important; text-decoration: none !important; transition: border-color .15s ease; }
.ff-other:hover { border-color: var(--fd-blue); }
.ff-other b { font: 600 14px var(--fd-sans); }
.ff-other span { font: 400 13px/1.5 var(--fd-sans); color: var(--fd-muted); }
.ff-other small { font: 400 12px/1.5 var(--fd-sans); color: var(--fd-muted); }
.ff-other small.is-warn { color: var(--fd-danger); }

.ff-answers { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--fd-line); }
.ff-answers-l { display: flex; flex-wrap: wrap; gap: 8px; }
.ff-answer { display: flex; gap: 6px; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--fd-field); background: #fff; border-radius: 16px; font: 400 13px var(--fd-sans); color: var(--fd-ink-2); cursor: pointer; }
.ff-answer:hover { border-color: var(--fd-blue); }
.ff-answer em { font-style: normal; color: var(--fd-faint); }

.ff-links { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 4px; font: 400 13px var(--fd-sans); }
.ff-links a { color: var(--fd-blue); }

@media (max-width: 1100px) {
    .fd-aside, .fd-rail { max-width: none; }
    .fd-rail { position: static; }
}

@media (max-width: 720px) {
    .fd-main { padding: 12px; }
    .fd-canvas { min-height: 0; }
    .fd-canvas-stage, .fd-app #designer-container { min-height: 440px !important; }
    .fd-3d-hint { display: none; }
    .ff { padding: 28px 16px 48px; }
    .ff h1 { font-size: 26px; }
    .ff-options { grid-template-columns: 1fr; }
}

/* ── Neutralise legacy page-wide rules (customfixture_kelvin.css etc.) inside the redesign ── */
.fd-app h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font: 600 14px var(--fd-sans) !important;
    color: var(--fd-ink) !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.fd-app label { margin-bottom: 0; }
.fd-app .ui-panel { padding: 0; box-shadow: none; border-radius: 10px; }
.fd-app #left-panel,
.fd-app #right-panel { width: auto; }
.fd-app .fd-ghost-btn.btn-wire-active,
.fd-app .fd-ghost-btn.btn-wire-active:hover {
    border-color: var(--fd-blue) !important;
    background: var(--fd-blue-tint) !important;
    color: var(--fd-blue) !important;
    box-shadow: none !important;
}
.fd-app #fd-wire-tools[hidden] { display: none !important; }
.fd-app .fd-ghost-btn.btn-secondary { background: #fff !important; color: var(--fd-ink-2) !important; border: 1px solid var(--fd-field) !important; }
.fd-app .fd-ghost-btn.btn-secondary:hover { border-color: var(--fd-blue) !important; color: var(--fd-blue) !important; }
.fd-steps-bar { scrollbar-width: none; }
.fd-steps-bar::-webkit-scrollbar { display: none; }
.fd-app #pogo-pin-help { font-size: 12px; line-height: 1.5; color: var(--fd-muted); }
.fd-app #pogo-pin-help p { margin: 0 0 4px; }
.fd-app #pogo-pin-help strong { color: var(--fd-ink); font-weight: 600; }
.ff [hidden] { display: none !important; }
.fd-seg-lg label { height: 30px; padding: 0 14px; border-radius: 5px; font: 500 13px var(--fd-sans); }

/* Kelvin pins: numbered circles; grow on hover, lift while dragged (vertical only). */
.fd-app #fd-move-tools[hidden] { display: none !important; }
.fd-app .fd-pin { transform-box: fill-box; transform-origin: center; transition: transform .12s ease; }
.fd-app .fd-pin:not(.is-off):hover { transform: scale(1.14); }
.fd-app .fd-pin.is-lifted { transform: scale(1.12); filter: drop-shadow(0 6px 7px rgba(0, 0, 0, .25)); }

/* Bar under the drawing: selected pin (Fitted toggle) or inline value editor (pitch / hole spacing). */
.fd-hint.is-insp { background: var(--fd-blue-soft); border-top-color: #DCE3F5; }
.fd-hint.is-insp #fd-hint-text,
.fd-hint.is-insp .fd-legend { display: none; }
.fd-insp { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; min-width: 0; animation: fdInspIn .16s ease both; }
.fd-insp[hidden] { display: none; }
.fd-app .fd-field[hidden] { display: none; }
@keyframes fdInspIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.fd-insp-title { font: 600 13px var(--fd-sans); color: var(--fd-ink); white-space: nowrap; }
.fd-insp-note { font: 400 12px var(--fd-sans); color: var(--fd-muted); white-space: nowrap; }
.fd-insp-keys { font: 400 12px var(--fd-sans); color: var(--fd-muted); }
.fd-insp-error { font: 500 12px var(--fd-sans); color: var(--fd-danger); }
.fd-insp-field { width: 140px; height: 32px; background: #fff; }
.fd-insp-field input { font-size: 13px; }
/* Kelvin selected pin: exact X / Y fields */
.fd-insp-field.fd-pin-xy { width: 140px; }
.fd-pin-xy input { min-width: 56px; }
/* With the X / Y fields the bar may need two lines on narrower screens. */
.fd-insp.has-xy { flex-wrap: wrap; row-gap: 8px; }
.fd-pin-xy .fd-pin-xy-axis { font-weight: 600; color: var(--fd-ink); margin-right: 4px; }
/* Pogo selected pin: X / Y fields match the green dimension lines on the drawing */
.fd-insp-field.fd-pin-xy.is-picked { border-color: #16A34A; box-shadow: 0 0 0 1px #16A34A inset; background: #F0FDF4; }
.fd-pin-xy.is-picked .fd-pin-xy-axis { color: #16A34A; }
/* Pogo: gap to the closest pin on the left / above (outlined like the gap labels on the drawing) */
.fd-insp-field.fd-pin-xy.fd-pin-gap { width: 215px; background: #fff; box-shadow: none; border-style: dashed; }
.fd-pin-gap .fd-pin-xy-axis { white-space: nowrap; }
/* Pogo: field opened over a distance label on the drawing */
.fd-app .pogo-dist-edit {
  position: absolute; z-index: 5; height: 24px; padding: 0 6px; box-sizing: border-box;
  font: 600 12px 'IBM Plex Mono', ui-monospace, monospace; color: #15803D; text-align: center;
  background: #fff; border: 2px solid #16A34A; border-radius: 4px; outline: none;
  box-shadow: 0 2px 8px rgba(22, 163, 74, .25);
}
.fd-insp .fd-ghost-btn { display: inline-flex; align-items: center; gap: 6px; }
.fd-app .fd-ghost-btn.fd-insp-apply { background: var(--fd-blue); border-color: var(--fd-blue); color: #fff; }
.fd-app .fd-ghost-btn.fd-insp-apply:hover { background: var(--fd-blue-hover); color: #fff; }
.fd-fitted .fd-check {
    width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid #B5B9C0; background: #fff;
    display: grid; place-items: center; color: #fff; font: 700 10px/1 var(--fd-sans);
    transition: background-color .15s ease, border-color .15s ease;
}
.fd-fitted.is-on .fd-check { background: var(--fd-blue); border-color: var(--fd-blue); }
.fd-fitted:disabled { opacity: .6; cursor: not-allowed; }
.fd-insp-close {
    width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent;
    color: var(--fd-muted); font: 400 18px/1 var(--fd-sans); cursor: pointer;
}
.fd-insp-close:hover { background: #E8EEFC; color: var(--fd-ink); }
.fd-app .fd-pin.is-off:hover { transform: scale(1.08); }

/* Hole palette icons for counterbore / nut trap (like the redesign) */
.fd-hole-icon.cbore { background: #AEB2B9; }
.fd-hole-icon.nut { background: #AEB2B9; border-radius: 0; clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%); }
.fd-hole-icon i { width: 52%; aspect-ratio: 1; border-radius: 50%; background: #5B6068; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .4); }
.fd-hole-icon.through i, .fd-hole-icon.blind i { display: none; }
.fd-app #fd-hole-cbore-wrap[hidden], .fd-app #fd-hole-nut-wrap[hidden], .fd-app #fd-hole-size-wrap[hidden], .fd-app #fd-hole-depth-wrap[hidden] { display: none; }

/* Kelvin: "Custom layout — Reset to grid" note in the Pin layout card */
.fd-custom-note {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; background: var(--fd-blue-soft); border: 1px solid #DCE3F5; border-radius: 6px;
    font: 400 12px/1.45 var(--fd-sans); color: var(--fd-ink-2);
    animation: fdInspIn .16s ease both;
}
.fd-custom-note[hidden] { display: none; }
.fd-reset-btn {
    flex: none; height: 28px; padding: 0 10px; border: 1px solid var(--fd-blue); background: #fff; color: var(--fd-blue);
    border-radius: 5px; font: 500 12px var(--fd-sans); cursor: pointer; white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
.fd-reset-btn:hover { background: var(--fd-blue); color: #fff; }

/* Kelvin holes: remove one / remove all */
.fd-app .fd-ghost-btn.fd-danger-ghost { border-color: #F0CFCB; background: #FDF4F3; color: var(--fd-danger); }
.fd-app .fd-ghost-btn.fd-danger-ghost:hover { border-color: var(--fd-danger); color: var(--fd-danger); }
.fd-app .fd-ghost-btn.fd-remove-all-holes.is-armed { border-color: var(--fd-danger); background: var(--fd-danger); color: #fff; }
.fd-app #fd-remove-all-wrap[hidden] { display: none; }
.fd-link-danger {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: 500 12px var(--fd-sans); color: var(--fd-danger);
}
.fd-link-danger:hover { text-decoration: underline; }
.fd-link-danger.is-armed { font-weight: 600; text-decoration: underline; }
.fd-insp { flex-wrap: nowrap; }
.fd-insp > * { flex: none; }
.fd-insp .fd-flex { flex: 1 1 0; min-width: 0; }
.fd-insp .fd-insp-keys { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .fd-insp { flex-wrap: wrap; } }

/* Drag image while dragging a hole tile (same icon as the tile, a bit larger, lifted) */
.fd-hole-icon.fd-hole-drag-image {
    position: fixed; top: -200px; left: -200px; width: 32px; height: 32px;
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, .35), 0 8px 20px rgba(0, 0, 0, .25);
}
.fd-hole-icon.nut.fd-hole-drag-image { box-shadow: none; }

/* Canvas corner action: remove all holes / fixings */
.fd-canvas-float {
    position: absolute; right: 12px; bottom: 12px; z-index: 3;
    height: 30px; padding: 0 12px; border-radius: 6px;
    border: 1px solid #F0CFCB; background: #fff; color: var(--fd-danger);
    font: 500 12px var(--fd-sans); cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    animation: fdInspIn .16s ease both;
}
.fd-canvas-float:hover { background: #FDF4F3; border-color: var(--fd-danger); }
.fd-canvas-float.is-armed { background: var(--fd-danger); border-color: var(--fd-danger); color: #fff; }
.fd-canvas-float[hidden] { display: none; }

/* "Fixture Designer" in the header is the link to the start page */
.fd-nav .navbar-brand .fd-brand-sub { transition: color .15s ease; }
.fd-nav .navbar-brand:hover .fd-brand-sub,
.fd-nav .navbar-brand.active .fd-brand-sub { color: #fff; }

/* Undo / redo (all designers) */
.fd-history { display: flex; align-items: center; gap: 4px; }
.fd-app .fd-ghost-btn:disabled { opacity: .4; cursor: default; border-color: var(--fd-field); color: var(--fd-ink-2); }
.fd-app #fd-redo { padding: 0 10px; }

/* Pogo land-pattern zoom */
.fd-zoom { display: inline-flex; align-items: center; height: 30px; border: 1px solid var(--fd-field); border-radius: 6px; background: #fff; overflow: hidden; }
.fd-zoom button {
    width: 30px; height: 100%; border: 0; background: #FAFAF8; color: var(--fd-ink-2);
    font: 500 16px var(--fd-mono); cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.fd-zoom button:hover:not(:disabled) { background: #F0F0EC; color: var(--fd-blue); }
.fd-zoom button:disabled { opacity: .35; cursor: default; }
.fd-zoom-label { min-width: 48px; text-align: center; font: 500 12px var(--fd-mono); color: var(--fd-ink-2); border-left: 1px solid var(--fd-line); border-right: 1px solid var(--fd-line); line-height: 28px; }

/* ═════════════ In-app checkout (Views/Checkout) ═════════════ */
.co { color: var(--fd-ink); font-family: var(--fd-sans); min-height: calc(100vh - 110px); }
.co [hidden] { display: none !important; }
.co-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; padding: 16px; max-width: 1180px; margin: 0 auto; align-items: start; }
.co-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.co-rail { position: sticky; top: 16px; max-width: none; flex: none; }
.co-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4px 2px 6px; }
.co-head h1 { margin: 2px 0 0; font: 600 26px/1.2 var(--fd-sans); letter-spacing: -.01em; }
.co-eyebrow { font: 600 11px var(--fd-mono); letter-spacing: .08em; color: var(--fd-blue); }
.co-back { font: 500 13px var(--fd-sans); color: var(--fd-muted); text-decoration: none; }
.co-back:hover { color: var(--fd-blue); }
.co-muted { color: var(--fd-muted); font-weight: 400; }
.co-note { margin: 0; font: 400 12px/1.5 var(--fd-sans); color: var(--fd-muted); }
.co-link { border: 0; background: none; padding: 0; font: 500 13px var(--fd-sans); color: var(--fd-blue); cursor: pointer; }
.co-link:hover { text-decoration: underline; }
.co-card { transition: box-shadow .2s ease, border-color .2s ease; }
.co-card.is-attention { border-color: var(--fd-red); box-shadow: 0 0 0 3px rgba(209, 59, 47, .12); }

/* lines */
.co-lines { padding: 4px 16px; }
.co-line { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--fd-line-soft); }
.co-line:first-child { border-top: 0; }
.co-line-img { width: 48px; height: 48px; border-radius: 8px; background: var(--fd-wash); display: grid; place-items: center; overflow: hidden; }
.co-line-img img { width: 100%; height: 100%; object-fit: contain; }
.co-line-ph { font: 600 11px var(--fd-mono); color: var(--fd-faint); }
.co-line-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-line-t b { font: 600 14px/1.35 var(--fd-sans); }
.co-line-t .co-muted { font: 400 12px var(--fd-mono); }
.co-line-opts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.co-line-opts .fd-chip { height: 22px; min-width: 0; padding: 0 8px; font-size: 11px; cursor: default; }
.co-line-q { font: 400 12px var(--fd-mono); color: var(--fd-muted); white-space: nowrap; }
.co-line-v { font: 600 14px var(--fd-mono); white-space: nowrap; text-align: right; min-width: 90px; }

/* address */
.co-address-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; font: 400 13px/1.55 var(--fd-sans); }
.co-address-grid .co-muted { display: block; font-size: 12px; margin-bottom: 2px; }
.co-address-grid b { display: block; font-weight: 600; }
.co-empty { padding: 12px; border: 1.5px dashed var(--fd-field); border-radius: 8px; font: 400 13px var(--fd-sans); color: var(--fd-muted); }
.co-picker, .co-form { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--fd-line-soft); animation: fdInspIn .16s ease both; }
.co-picker-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.co-picker-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.co-form-title { font: 600 13px var(--fd-sans); }
.co .fd-ghost-btn.co-primary-ghost { background: var(--fd-blue); border-color: var(--fd-blue); color: #fff; }
.co .fd-ghost-btn.co-primary-ghost:hover { background: var(--fd-blue-hover); color: #fff; }
.co .fd-ghost-btn:disabled { opacity: .5; cursor: default; }
.co .fd-input input { flex: 1; width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 10px; font: 400 14px var(--fd-sans); background: transparent; color: var(--fd-ink); }
.co-textarea, .co-select {
    width: 100%; border: 1px solid var(--fd-field); border-radius: 6px; background: #fff; color: var(--fd-ink);
    font: 400 14px var(--fd-sans); padding: 8px 10px; outline: 0; transition: border-color .15s ease, box-shadow .15s ease; resize: vertical;
}
.co-select { height: 36px; padding: 0 8px; }
.co-textarea:focus, .co-select:focus { border-color: var(--fd-blue); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); }
.co .is-invalid { border-color: var(--fd-red) !important; box-shadow: 0 0 0 3px rgba(209, 59, 47, .1); }

/* radio option rows (shipping, cards, addresses) */
.co-options { display: flex; flex-direction: column; gap: 8px; }
.co-option {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0;
    border: 1.5px solid var(--fd-line); border-radius: 8px; background: #fff; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.co-option:hover { border-color: var(--fd-blue-line); }
.co-option.is-on { border-color: var(--fd-blue); background: var(--fd-blue-soft); box-shadow: 0 0 0 3px rgba(31, 79, 209, .1); }
.co-option input { accent-color: var(--fd-blue); width: 16px; height: 16px; flex: none; margin: 0; }
.co-option-t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.co-option-t b { font: 600 14px var(--fd-sans); }
.co-option-t span { font: 400 12px/1.4 var(--fd-sans); color: var(--fd-muted); }
.co-option-v { font: 600 14px var(--fd-mono); white-space: nowrap; }
.co-brand { flex: none; width: 40px; height: 26px; border-radius: 4px; background: var(--fd-ink); color: #fff; display: grid; place-items: center; font: 700 9px var(--fd-mono); letter-spacing: .04em; }
.co-brand-new { background: var(--fd-wash); color: var(--fd-ink-2); font-size: 16px; }
.co-skel { height: 48px; border-radius: 8px; background: linear-gradient(90deg, #F0F0EC 0%, #F8F8F5 50%, #F0F0EC 100%); background-size: 200% 100%; animation: coShimmer 1.2s linear infinite; }
@keyframes coShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.co-alert { padding: 14px; border: 1px solid #F0CFCB; border-radius: 8px; background: #FDF4F3; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font: 400 13px/1.5 var(--fd-sans); }
.co-alert b { color: var(--fd-danger); }
.co-alert p { margin: 0; }

/* payment */
.co-pay-modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.co-pay-mode { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 0; border: 1.5px solid var(--fd-line); border-radius: 8px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.co-pay-mode:hover { border-color: var(--fd-blue-line); }
.co-pay-mode.is-on { border-color: var(--fd-blue); background: var(--fd-blue-soft); }
.co-pay-mode input { accent-color: var(--fd-blue); width: 16px; height: 16px; margin: 0; }
.co-pay-mode-t { display: flex; flex-direction: column; gap: 1px; }
.co-pay-mode-t b { font: 600 14px var(--fd-sans); }
.co-pay-mode-t span { font: 400 12px var(--fd-sans); color: var(--fd-muted); }
.co-pay-panel { display: flex; flex-direction: column; gap: 12px; animation: fdInspIn .16s ease both; }
.co-new-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--fd-line-soft); border-radius: 8px; background: var(--fd-canvas); }
.co-card-element { padding: 10px 12px; min-height: 40px; border: 1px solid var(--fd-field); border-radius: 6px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.co-card-element.is-focus { border-color: var(--fd-blue); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); }
.co-card-element.is-invalid { border-color: var(--fd-red); }
.co-check { display: flex; align-items: flex-start; gap: 8px; margin: 0; font: 400 13px/1.45 var(--fd-sans); color: var(--fd-ink-2); cursor: pointer; }
.co-check input { accent-color: var(--fd-blue); width: 16px; height: 16px; margin: 1px 0 0; flex: none; }
.co-check a { color: var(--fd-blue); }
.co-account { padding: 14px; border-radius: 8px; background: var(--fd-wash); display: flex; flex-direction: column; gap: 4px; }
.co-account-l { font: 500 12px var(--fd-sans); color: var(--fd-muted); }
.co-account-v { font: 600 14px var(--fd-sans); }
.co-order-fields { padding-top: 12px; border-top: 1px solid var(--fd-line-soft); }

/* summary */
.co-sum { padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.co-sum-row { display: flex; justify-content: space-between; gap: 10px; font: 400 13px var(--fd-sans); }
.co-sum-row b { font: 600 13px var(--fd-mono); white-space: nowrap; }
.co-sum-total { padding-top: 10px; border-top: 1px solid var(--fd-line-soft); font-weight: 600; }
.co-sum-total b { font-size: 15px; }
.co-tax { margin: 0; font-size: 11px; }
.co-terms { font: 400 12px/1.5 var(--fd-sans); color: var(--fd-ink-2); }
.co-terms summary { cursor: pointer; font-weight: 500; color: var(--fd-blue); }
.co-terms div { max-height: 180px; overflow: auto; margin-top: 6px; padding: 8px 10px; background: var(--fd-wash); border-radius: 6px; }
.co-error { margin: 0; padding: 10px 12px; border-radius: 6px; background: #FDF4F3; border: 1px solid #F0CFCB; color: #7A2E2A; font: 400 12px/1.5 var(--fd-sans); }
.co-error ul { margin: 4px 0 0; padding-left: 18px; }
.co-place { height: 46px; font-size: 15px; font-weight: 600; position: relative; }
.co-place .co-place-busy { display: none; align-items: center; gap: 8px; }
.co-place.is-busy .co-place-t { display: none; }
.co-place.is-busy .co-place-busy { display: inline-flex; }
.co-place:disabled { cursor: progress; opacity: .85; }
.co-secure { text-align: center; }
.co.is-placing .co-col { pointer-events: none; opacity: .7; transition: opacity .2s ease; }

/* states */
.co-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 64px 20px; text-align: center; color: var(--fd-muted); }
.co-state-card { width: 100%; max-width: 620px; background: #fff; border: 1px solid var(--fd-line); border-radius: 12px; padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; align-items: center; color: var(--fd-ink); }
.co-state-card h1 { margin: 0; font: 600 24px/1.25 var(--fd-sans); }
.co-state-card p { margin: 0; font: 400 14px/1.55 var(--fd-sans); color: var(--fd-ink-2); }
.co-state-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.co-state-actions .fd-btn { width: auto; min-width: 190px; }
.co-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fd-line); border-top-color: var(--fd-blue); animation: coSpin .8s linear infinite; }
.co-spinner-sm { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes coSpin { to { transform: rotate(360deg); } }
.co-done { animation: ffIn .3s ease both; }
.co-done-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--fd-ok); color: #fff; display: grid; place-items: center; font: 700 26px var(--fd-sans); box-shadow: 0 8px 24px rgba(22, 135, 74, .25); }
.co-done-grid { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--fd-line); border: 1px solid var(--fd-line); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.co-done-grid div { background: var(--fd-canvas); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.co-done-grid span { font: 400 12px var(--fd-sans); color: var(--fd-muted); }
.co-done-grid b { font: 600 15px var(--fd-mono); }
.co-next { text-align: left; margin: 8px 0 0; padding-left: 20px; font: 400 13px/1.7 var(--fd-sans); color: var(--fd-ink-2); align-self: stretch; }

@media (max-width: 980px) {
    .co-main { grid-template-columns: 1fr; }
    .co-rail { position: static; }
}
@media (max-width: 640px) {
    .co-main { padding: 12px; }
    .co-head h1 { font-size: 22px; }
    .co-line { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .co-line-q { grid-column: 2; }
    .co-line-v { grid-column: 3; grid-row: 1; }
    .co-address-grid, .co-pay-modes { grid-template-columns: 1fr; }
    .co-done-grid { grid-template-columns: 1fr; }
    .co-state-card { padding: 24px 18px; }
}

/* Checkout steps: on phones keep every dot visible and label only the current step */
@media (max-width: 640px) {
    .co-steps li { padding-right: 8px; gap: 6px; }
    .co-steps .fd-rule { width: 14px; }
    .co-steps li:not(.is-current) .fd-step-label { display: none; }
}

/* Checkout terms and conditions: one checkbox per applicable set + reader dialog */
.co-terms-list { display: flex; flex-direction: column; gap: 10px; }
.co-terms-list:empty { display: none; }
.co-term a { font-weight: 500; }
.co-modal { width: min(720px, calc(100vw - 32px)); max-height: min(86vh, 760px); padding: 0; border: 1px solid var(--fd-line); border-radius: 12px; background: #fff; color: var(--fd-ink); box-shadow: 0 24px 60px rgba(21, 23, 28, .22); }
.co-modal[open] { display: flex; flex-direction: column; }
.co-modal::backdrop { background: rgba(21, 23, 28, .45); }
.co-modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--fd-line-soft); }
.co-modal-h h2 { margin: 0; font: 600 17px/1.3 var(--fd-sans); color: var(--fd-ink); }
.co-modal-x { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--fd-muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.co-modal-x:hover { background: var(--fd-wash); color: var(--fd-ink); }
.co-modal-b { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 22px; outline: none; }
.co-modal-f { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--fd-line-soft); background: var(--fd-canvas); }
.co-modal-hint { margin-right: auto; font-size: 12.5px; }
.co-terms-body { font: 400 14px/1.6 var(--fd-sans); color: var(--fd-ink-2); }
.co-terms-body h1, .co-terms-body h2, .co-terms-body h3, .co-terms-body h4 { margin: 16px 0 4px; font: 600 15px/1.35 var(--fd-sans); color: var(--fd-ink); }
.co-terms-body > :first-child { margin-top: 0; }
.co-terms-body p { margin: 0 0 10px; }
.co-terms-body ul, .co-terms-body ol { margin: 0 0 10px; padding-left: 20px; }
.co-terms-body a { color: var(--fd-blue); }
.co-terms-body table { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.co-terms-body td, .co-terms-body th { border: 1px solid var(--fd-line); padding: 6px 8px; text-align: left; }
@media (max-width: 640px) {
    .co-modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
    .co-modal-f { flex-wrap: wrap; }
    .co-modal-hint { flex-basis: 100%; }
    .co-modal-f .fd-btn { flex: 1 1 0; }
}
.co-modal-f .fd-btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* Busy buttons (fdBusy in fd_shell.js): save fixture / email quotation in progress */
.fd-btn-spinner { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: coSpin .7s linear infinite; }
button[aria-busy="true"] { cursor: progress !important; opacity: .8; }
.save-status[data-busy]::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: coSpin .7s linear infinite; }

/* ── Quick guide (fd_guide.js) ─────────────────────────────────────────────── */
.fd-steps-bar { display: flex; align-items: center; gap: 12px; }
.fdg-launch { flex: none; margin-left: auto; position: sticky; right: 0; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 8px; border: 1px solid var(--fd-line); border-radius: 999px; background: #fff; color: var(--fd-ink); font: 500 13px var(--fd-sans); cursor: pointer; box-shadow: -12px 0 12px #fff; transition: border-color .15s ease, background .15s ease; }
.fdg-launch:hover { border-color: var(--fd-blue-line); background: var(--fd-blue-soft); }
.fdg-launch:focus-visible { outline: 2px solid var(--fd-blue); outline-offset: 2px; }
.fdg-launch-i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--fd-blue); color: #fff; font: 600 12px var(--fd-sans); }

.fdg { position: fixed; inset: 0; z-index: 4000; }
.fdg[hidden] { display: none; }
html.fdg-open { scroll-behavior: auto; }
.fdg-dim { position: absolute; inset: 0; background: transparent; }
.fdg.is-center .fdg-dim { background: rgba(21, 23, 28, .55); }
.fdg-shade { position: fixed; background: rgba(21, 23, 28, .55); pointer-events: none; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.fdg.is-center .fdg-shade { display: none; }
.fdg-spot { position: fixed; border-radius: 4px; box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(31, 79, 209, .35); pointer-events: none; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease, opacity .2s ease; }
.fdg.is-center .fdg-spot { opacity: 0 !important; }

.fdg-card { position: fixed; width: min(380px, calc(100vw - 24px)); background: #fff; color: var(--fd-ink); border-radius: 12px; box-shadow: 0 24px 60px rgba(21, 23, 28, .28); padding: 22px 22px 16px; outline: none; transition: left .25s ease, top .25s ease; font-family: var(--fd-sans); }
.fdg.is-center .fdg-card { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); padding: 30px 30px 20px; transition: none; }
.fdg-card.is-sheet { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-height: 60vh; overflow-y: auto; border-radius: 16px 16px 0 0; }
.fdg-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--fd-muted); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.fdg-x:hover { background: var(--fd-wash); color: var(--fd-ink); }
.fdg-kicker { display: block; font: 600 11px var(--fd-mono); letter-spacing: .06em; color: var(--fd-blue); margin-bottom: 6px; }
.fdg-card h2 { margin: 0 28px 8px 0; font: 600 18px/1.3 var(--fd-sans); color: var(--fd-ink); text-transform: none; text-align: left; letter-spacing: normal; }
.fdg.is-center .fdg-card h2 { font-size: 22px; }
.fdg-text p, .fdg-lead { margin: 0 0 8px; font: 400 14px/1.55 var(--fd-sans); color: var(--fd-ink-2); }
.fdg-lead { font-size: 15px; }
.fdg-muted { margin: 12px 0 0; font-size: 12.5px; color: var(--fd-muted); }
.fdg-card kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--fd-line); border-bottom-width: 2px; border-radius: 4px; background: var(--fd-canvas); font: 500 12px var(--fd-mono); color: var(--fd-ink); }
.fdg-red { color: var(--fd-red); font-weight: 600; }
.fdg-green { color: var(--fd-ok); font-weight: 600; }

.fdg-flow { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fdg-flow li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--fd-line); border-radius: 999px; font: 500 13px var(--fd-sans); color: var(--fd-ink); background: var(--fd-canvas); }
.fdg-flow li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--fd-blue); color: #fff; font: 600 11px var(--fd-mono); }
.fdg-done { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 50%; background: #E7F4EC; color: var(--fd-ok); font: 700 22px var(--fd-sans); }
.fdg-recap { margin: 8px 0 0; padding-left: 18px; font: 400 14px/1.8 var(--fd-sans); color: var(--fd-ink-2); }

.fdg-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--fd-line-soft); }
.fdg-flex { flex: 1; }
.fdg-foot .fd-btn { width: auto; min-width: 0; padding: 0 16px; height: 36px; }
.fdg-foot .fd-btn[hidden] { display: none; }
.fdg-dots { display: flex; gap: 5px; flex-wrap: wrap; max-width: 55%; }
.fdg-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--fd-field); transition: background .2s ease, width .2s ease; }
.fdg-dots span.is-done { background: var(--fd-blue-line); }
.fdg-dots span.is-on { width: 16px; border-radius: 3px; background: var(--fd-blue); }

.fdg-prompt { position: fixed; left: 16px; bottom: 16px; z-index: 3500; display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 24px)); padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--fd-ink); color: #fff; font: 400 13px/1.4 var(--fd-sans); box-shadow: 0 12px 30px rgba(21, 23, 28, .25); animation: ffIn .25s ease; }
.fdg-launch.is-pulse { animation: fdgPulse 1.6s ease-out 3; border-color: var(--fd-blue-line); }
@keyframes fdgPulse { 0% { box-shadow: -12px 0 12px #fff, 0 0 0 0 rgba(31, 79, 209, .45); } 100% { box-shadow: -12px 0 12px #fff, 0 0 0 12px rgba(31, 79, 209, 0); } }
.fdg-prompt-go { flex: none; border: 0; border-radius: 6px; padding: 6px 12px; background: #fff; color: var(--fd-ink); font: 600 12.5px var(--fd-sans); cursor: pointer; }
.fdg-prompt-x { flex: none; border: 0; background: none; color: #fff; opacity: .7; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.fdg-prompt-x:hover { opacity: 1; }

@media (max-width: 640px) {
    .fdg-launch span:last-child { display: none; }
    .fdg-launch { padding: 0 7px; }
    .fdg.is-center .fdg-card { padding: 24px 20px 16px; }
    .fdg-foot { flex-wrap: wrap; }
    .fdg-dots { max-width: 100%; flex-basis: 100%; margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .fdg-spot, .fdg-shade, .fdg-card, .fdg-prompt, .fdg-launch.is-pulse { transition: none; animation: none; }
}

/* ── Button colours ───────────────────────────────────────────────────────────
   The designer toolbars were all grey / black, which hid the important controls.
   Selected toggles are solid blue, everyday tools have a blue outline, Auto wire is
   green and anything that clears work is red. Disabled buttons keep the grey style. */
.fd-app .fd-seg button,
.fd-app .fd-seg label { color: var(--fd-ink-2); }
.fd-app .fd-seg button:hover,
.fd-app .fd-seg label:hover { color: var(--fd-blue); }
.fd-app .fd-seg label:has(input:checked),
.fd-app .fd-seg button.is-on,
.fd-app .fd-seg label:has(input:checked):hover,
.fd-app .fd-seg button.is-on:hover {
    background: var(--fd-blue);
    color: #fff;
    box-shadow: 0 1px 2px rgba(31, 79, 209, .35);
}

.fd-app .fd-ghost-btn {
    border-color: var(--fd-blue-line);
    color: var(--fd-blue);
}
.fd-app .fd-ghost-btn:hover:not(:disabled) {
    border-color: var(--fd-blue);
    background: var(--fd-blue-tint);
    color: var(--fd-blue);
}

.fd-app .fd-ghost-btn.btn-wire-active,
.fd-app .fd-ghost-btn.btn-wire-active:hover {
    border-color: var(--fd-blue) !important;
    background: var(--fd-blue) !important;
    color: #fff !important;
    box-shadow: 0 1px 2px rgba(31, 79, 209, .35) !important;
}

.fd-app .fd-ghost-btn.btn-secondary {
    border-color: var(--fd-blue-line) !important;
    color: var(--fd-blue) !important;
}
.fd-app .fd-ghost-btn.btn-secondary:hover {
    background: var(--fd-blue-tint) !important;
}

.fd-app #btn-auto-wire.fd-ghost-btn {
    border-color: var(--fd-ok) !important;
    background: #EAF6EF !important;
    color: var(--fd-ok) !important;
}
.fd-app #btn-auto-wire.fd-ghost-btn:hover {
    background: var(--fd-ok) !important;
    color: #fff !important;
}

.fd-app #btn-reset-wire.fd-ghost-btn,
.fd-app .fd-danger-btn {
    border-color: var(--fd-danger) !important;
    background: #FDF4F3 !important;
    color: var(--fd-danger) !important;
}
.fd-app #btn-reset-wire.fd-ghost-btn:hover,
.fd-app .fd-danger-btn:hover:not(:disabled) {
    background: var(--fd-danger) !important;
    color: #fff !important;
}
.fd-app .fd-danger-btn:disabled { opacity: .45; cursor: default; }

.fd-app .fd-zoom { border-color: var(--fd-blue-line); }
.fd-app .fd-zoom button { color: var(--fd-blue); }
.fd-app .fd-zoom button:hover:not(:disabled) { background: var(--fd-blue-tint); }

/* ── Session expired dialog (fd_session.js) ───────────────────────────────── */
.fd-session { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px; background: rgba(21, 23, 28, .45); }
.fd-session[hidden] { display: none; }
.fd-session-card { width: min(440px, 100%); padding: 22px 22px 18px; border-radius: 12px; background: #fff; color: var(--fd-ink); font: 400 14px/1.5 var(--fd-sans); box-shadow: 0 18px 40px rgba(21, 23, 28, .25); }
.fd-session-title { margin: 0 0 8px; font: 600 18px/1.3 var(--fd-sans); color: var(--fd-ink); }
.fd-session-body { margin: 0 0 8px; color: var(--fd-ink-2); }
.fd-session-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #EAF6EF; color: var(--fd-ok); font-weight: 500; }
.fd-session-status { margin: 0 0 12px; min-height: 1.5em; font-size: 13px; color: var(--fd-muted); }
.fd-session-status[data-kind="info"] { color: var(--fd-blue); }
.fd-session-status[data-kind="warn"] { color: var(--fd-danger); }
.fd-session-status[data-kind="ok"] { color: var(--fd-ok); }
.fd-session-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.fd-session-actions .fd-ghost-btn { height: 36px; border-color: var(--fd-blue-line); color: var(--fd-blue); }
.fd-session-actions .fd-btn-primary { height: 36px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--fd-blue); color: #fff; font: 600 14px var(--fd-sans); cursor: pointer; }
.fd-session-actions .fd-btn-primary:hover { background: var(--fd-blue-hover); }
.fd-session-actions .fd-btn-primary:disabled { opacity: .6; cursor: default; }
.fd-session .fd-session-title { text-align: left; text-transform: none; letter-spacing: 0; }
.fd-session .fd-session-actions button { width: auto; margin: 0; flex: none; }
