/* ============================================================
   Freedom Client Portal — Website Design brief
   Depends on portal.css tokens (--fs-*)
   ============================================================ */

.fcp-wd { --wd-ok: #16a34a; --wd-ok-bg: #ecfdf5; --wd-warn: #f59e0b; --wd-warn-bg: #fffbeb; --wd-empty: #c7c7cc; }
.fcp-wd [hidden] { display: none !important; }

/* ── Hero ─────────────────────────────────────────────────── */
.fcp-wd-hero { align-items: center; }
.fcp-wd-hero-copy { max-width: 640px; }
.fcp-wd-hero-copy h1 { margin: 10px 0 8px; font-family: var(--fs-font-display); font-size: 30px; letter-spacing: -0.02em; }
.fcp-wd-hero-copy p:last-child { margin: 0; color: var(--fs-muted); font-size: 15px; line-height: 1.6; }
.fcp-wd-hero-side { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.fcp-wd-progress { position: relative; width: 92px; height: 92px; }
.fcp-wd-ring { width: 92px; height: 92px; transform: rotate(-90deg); }
.fcp-wd-ring circle { fill: none; stroke-width: 4; }
.fcp-wd-ring-bg { stroke: var(--fs-border); }
.fcp-wd-ring-fg { stroke: var(--fs-orange); stroke-linecap: round; stroke-dasharray: 119.38; transition: stroke-dashoffset .5s ease; }
.fcp-wd-progress-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.1; }
.fcp-wd-progress-text strong { font-family: var(--fs-font-display); font-size: 20px; letter-spacing: -0.02em; }
.fcp-wd-progress-sub { font-size: 10px; color: var(--fs-muted); margin-top: 2px; }
.fcp-wd-status { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.fcp-wd-status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .01em; background: var(--fs-bg); border: 1px solid var(--fs-border); color: var(--fs-text); }
.fcp-wd-status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--fs-muted); }
.fcp-wd-status-pill.is-draft::before { background: var(--fs-orange); }
.fcp-wd-status-pill.is-submitted { background: var(--wd-ok-bg); border-color: #bbf7d0; color: #166534; }
.fcp-wd-status-pill.is-submitted::before, .fcp-wd-status-pill.is-in_progress::before, .fcp-wd-status-pill.is-complete::before { background: var(--wd-ok); }
.fcp-wd-status-pill.is-in_progress { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.fcp-wd-status-pill.is-in_progress::before { background: #3b82f6; }
.fcp-wd-savestate { font-size: 12px; color: var(--fs-muted); min-height: 16px; display: inline-flex; align-items: center; gap: 6px; }
.fcp-wd-savestate.is-saved::before { content: '✓'; color: var(--wd-ok); font-weight: 800; }
.fcp-wd-savestate.is-saving::before, .fcp-wd-savestate.is-pending::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--fs-border); border-top-color: var(--fs-orange); animation: fcp-wd-spin .7s linear infinite; }
.fcp-wd-savestate.is-error { color: var(--fs-error-tx); font-weight: 600; }
@keyframes fcp-wd-spin { to { transform: rotate(360deg); } }

.fcp-wd-flash { margin: 0 0 16px; }
.fcp-wd-flash strong { display: block; margin-bottom: 2px; }

.fcp-wd-lockbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--fs-dark); color: #fff; border-radius: var(--fs-radius); padding: 16px 20px; margin: 0 0 20px; }
.fcp-wd-lockbar strong { display: block; font-size: 15px; margin-bottom: 2px; }
.fcp-wd-lockbar span { color: rgba(255,255,255,.72); font-size: 13.5px; }
.fcp-wd-lockbar .fcp-btn-outline { border-color: rgba(255,255,255,.4); color: #fff; }
.fcp-wd-lockbar .fcp-btn-outline:hover { background: rgba(255,255,255,.1); }

/* ── Layout ───────────────────────────────────────────────── */
.fcp-wd-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 22px; align-items: start; }
.fcp-wd-steps { position: sticky; top: 84px; }
.fcp-wd-steplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fcp-wd-step { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 9px 10px; cursor: pointer; font-family: inherit; color: var(--fs-text); transition: background var(--fs-transition), border-color var(--fs-transition); }
.fcp-wd-step:hover { background: rgba(255,255,255,.7); }
.fcp-wd-step.is-active { background: var(--fs-surface); border-color: var(--fs-border); box-shadow: var(--fs-shadow); }
.fcp-wd-step-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: #fff; border: 2px solid var(--wd-empty); color: var(--fs-muted); position: relative; }
.fcp-wd-step-num .tick { display: none; width: 14px; height: 14px; }
.fcp-wd-step.is-partial .fcp-wd-step-num { border-color: var(--wd-warn); color: #b45309; background: var(--wd-warn-bg); }
.fcp-wd-step.is-complete .fcp-wd-step-num { border-color: var(--wd-ok); background: var(--wd-ok); color: #fff; }
.fcp-wd-step.is-complete .fcp-wd-step-num .n { display: none; }
.fcp-wd-step.is-complete .fcp-wd-step-num .tick { display: block; }
.fcp-wd-step.is-active .fcp-wd-step-num { box-shadow: 0 0 0 4px var(--fs-orange-glow); }
.fcp-wd-step-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.fcp-wd-step-label { font-size: 13.5px; font-weight: 700; }
.fcp-wd-step-blurb { font-size: 11.5px; color: var(--fs-muted); margin-top: 2px; }
.fcp-wd-steps-foot { margin-top: 14px; padding: 14px 10px 0; border-top: 1px solid var(--fs-border); }
.fcp-wd-steps-foot .fcp-btn { width: 100%; }
.fcp-wd-steps-foot .fcp-wd-hint { margin-top: 10px; }

.fcp-wd-main { min-width: 0; }
.fcp-wd-panel { padding: 30px 32px 26px; }
.fcp-wd-panel[hidden] { display: none; }
.fcp-wd-panel-head { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--fs-border); }
.fcp-wd-stepcount { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fs-orange-dark); }
.fcp-wd-panel-head h2 { margin: 0 0 6px; font-family: var(--fs-font-display); font-size: 24px; letter-spacing: -0.02em; }
.fcp-wd-panel-head p:last-child { margin: 0; color: var(--fs-muted); font-size: 14.5px; line-height: 1.6; max-width: 680px; }

/* ── Fields ───────────────────────────────────────────────── */
.fcp-wd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.fcp-wd-span-2 { grid-column: 1 / -1; }
.fcp-wd-field { display: flex; flex-direction: column; min-width: 0; }
.fcp-wd-field label, .fcp-wd-label { font-size: 13px; font-weight: 650; color: var(--fs-dark); margin-bottom: 6px; display: block; }
.fcp-wd input[type='text'], .fcp-wd input[type='email'], .fcp-wd input[type='url'], .fcp-wd input[type='tel'], .fcp-wd input[type='number'], .fcp-wd textarea, .fcp-wd select {
    width: 100%; border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-sm); padding: 11px 13px; font-size: 14px; font-family: inherit; background: var(--fs-bg); color: var(--fs-text); appearance: none; -webkit-appearance: none;
    transition: border-color var(--fs-transition), box-shadow var(--fs-transition), background var(--fs-transition);
}
.fcp-wd .fcp-wd-panel select { height: auto !important; min-height: 44px; line-height: 1.4 !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 12px 8px !important; padding-right: 34px !important; }
.fcp-wd .fcp-wd-panel input[type='text'], .fcp-wd .fcp-wd-panel input[type='email'], .fcp-wd .fcp-wd-panel input[type='url'], .fcp-wd .fcp-wd-panel input[type='tel'], .fcp-wd .fcp-wd-panel input[type='number'] { height: auto; min-height: 44px; line-height: 1.4; }
.fcp-wd input:focus, .fcp-wd textarea:focus, .fcp-wd select:focus { outline: none; border-color: var(--fs-orange); background: #fff; box-shadow: 0 0 0 4px var(--fs-orange-glow); }
.fcp-wd input:disabled, .fcp-wd textarea:disabled, .fcp-wd select:disabled { background: #fafafa; color: #3a3a3c; cursor: default; opacity: 1; }
.fcp-wd textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.fcp-wd-hint { margin: 6px 0 0; font-size: 12px; color: var(--fs-muted); line-height: 1.5; }
.fcp-wd-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; cursor: pointer; font-weight: 500 !important; margin: 0; }
.fcp-wd-check input { width: 17px; height: 17px; accent-color: var(--fs-orange); margin-top: 2px; flex-shrink: 0; }
.fcp-wd-check--big { padding: 12px 14px; border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-sm); background: var(--fs-bg); }
.fcp-wd-check--big:has(input:checked) { border-color: var(--wd-ok); background: var(--wd-ok-bg); }

.fcp-wd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fcp-wd-chip { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--fs-border); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; transition: all var(--fs-transition); margin: 0 !important; }
.fcp-wd-chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.fcp-wd-chip:hover { border-color: var(--fs-orange); }
.fcp-wd-chip.is-on { background: var(--fs-dark); border-color: var(--fs-dark); color: #fff; }
.fcp-wd-chip:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--fs-orange-glow); }

.fcp-wd-colour-row { display: flex; gap: 8px; align-items: center; }
.fcp-wd-colour-pick { width: 46px; height: 44px; padding: 3px; border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-sm); background: #fff; cursor: pointer; flex-shrink: 0; }
.fcp-wd-colour-pick::-webkit-color-swatch-wrapper { padding: 0; }
.fcp-wd-colour-pick::-webkit-color-swatch { border: none; border-radius: 6px; }

.fcp-wd-seg { display: inline-flex; background: var(--fs-bg); border: 1.5px solid var(--fs-border); border-radius: 12px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.fcp-wd-seg-opt { margin: 0 !important; padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 600 !important; cursor: pointer; color: var(--fs-muted); transition: all var(--fs-transition); }
.fcp-wd-seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.fcp-wd-seg-opt.is-on { background: #fff; color: var(--fs-text); box-shadow: var(--fs-shadow); }
.fcp-wd-seg-opt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--fs-orange-glow); }
.fcp-wd-panel-head h2:focus { outline: none; }
.fcp-wd-panel-head h2:focus-visible { outline: 2px solid var(--fs-orange); outline-offset: 4px; border-radius: 4px; }

/* ── Repeaters ────────────────────────────────────────────── */
.fcp-wd-repeater { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.fcp-wd-rows { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.fcp-wd-row { display: flex; gap: 8px; align-items: flex-start; width: 100%; background: #fff; border: 1px solid var(--fs-border); border-radius: 12px; padding: 12px 12px 12px 14px; }
.fcp-wd-row-grid { flex: 1; display: grid; gap: 10px 14px; min-width: 0; }
.fcp-wd-row-grid--example { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.fcp-wd-row-grid--service { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, .6fr); }
.fcp-wd-row-grid--testimonial { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fcp-wd-row-grid--faq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.fcp-wd-row-grid .fcp-wd-field label { font-size: 12px; margin-bottom: 4px; }
.fcp-wd-row-grid input, .fcp-wd-row-grid textarea { padding: 9px 11px; font-size: 13.5px; }
.fcp-wd-row-remove, .fcp-wd-file-remove { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--fs-border); background: #fff; color: var(--fs-muted); font-size: 18px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all var(--fs-transition); }
.fcp-wd-row-remove:hover, .fcp-wd-file-remove:hover { border-color: var(--fs-error-tx); color: var(--fs-error-tx); background: var(--fs-error-bg); }
.fcp-wd-row-add { align-self: flex-start; }

/* ── Uploader ─────────────────────────────────────────────── */
.fcp-wd-uploader { display: flex; flex-direction: column; gap: 10px; }
.fcp-wd-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 22px 16px; border: 2px dashed var(--fs-border); border-radius: 14px; background: var(--fs-bg); color: var(--fs-muted); cursor: pointer; transition: all var(--fs-transition); position: relative; }
.fcp-wd-drop:hover, .fcp-wd-drop:focus-visible, .fcp-wd-drop.is-over { border-color: var(--fs-orange); background: #fff7ee; color: var(--fs-orange-dark); outline: none; }
.fcp-wd-drop input[type='file'] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.fcp-wd-drop svg { color: var(--fs-orange); margin-bottom: 4px; }
.fcp-wd-drop-text { font-size: 14px; color: var(--fs-text); }
.fcp-wd-drop-text u { color: var(--fs-orange-dark); text-underline-offset: 2px; }
.fcp-wd-drop-hint { font-size: 12px; }
.fcp-wd-files { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.fcp-wd-files:empty { display: none; }
.fcp-wd-file { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--fs-border); border-radius: 12px; background: #fff; min-width: 0; position: relative; }
.fcp-wd-file-thumb { flex-shrink: 0; width: 56px; height: 56px; border-radius: 9px; overflow: hidden; background: var(--fs-bg); border: 1px solid var(--fs-border); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.fcp-wd-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fcp-wd-file-ext { font-size: 10px; font-weight: 800; color: var(--fs-muted); letter-spacing: .04em; }
.fcp-wd-file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fcp-wd-file-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcp-wd-file-size { font-size: 11px; color: var(--fs-muted); }
.fcp-wd-file-bar { height: 4px; background: var(--fs-border); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.fcp-wd-file-barfill { display: block; height: 100%; width: 0; background: var(--fs-orange); transition: width .2s; }
.fcp-wd-file.is-error { border-color: var(--fs-error-bd); background: var(--fs-error-bg); }
.fcp-wd-file.is-error .fcp-wd-file-size { color: var(--fs-error-tx); font-weight: 600; white-space: normal; }
.fcp-wd-file.is-removing { opacity: .4; pointer-events: none; }
.fcp-wd-file-remove { width: 24px; height: 24px; font-size: 16px; }

/* ── Pages ────────────────────────────────────────────────── */
.fcp-wd-pagecount { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; margin-bottom: 22px; }
.fcp-wd-pagecount-ctrl label { font-size: 13px; font-weight: 650; display: block; margin-bottom: 8px; }
.fcp-wd-stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--fs-border); border-radius: 12px; overflow: hidden; background: #fff; }
.fcp-wd-stepper-btn { width: 44px; border: none; background: var(--fs-bg); font-size: 20px; font-weight: 600; cursor: pointer; color: var(--fs-text); font-family: inherit; }
.fcp-wd-stepper-btn:hover { background: var(--fs-orange-glow); color: var(--fs-orange-dark); }
.fcp-wd-stepper input[type='number'] { width: 84px; border: none !important; border-radius: 0 !important; text-align: center; font-size: 22px; font-weight: 800; font-family: var(--fs-font-display); background: #fff !important; box-shadow: none !important; -moz-appearance: textfield; padding: 8px 4px; }
.fcp-wd-stepper input::-webkit-outer-spin-button, .fcp-wd-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fcp-wd-callout { background: #fff7ee; border: 1px solid rgba(255,133,0,.28); border-radius: 14px; padding: 14px 16px; font-size: 13px; line-height: 1.5; }
.fcp-wd-callout strong { display: block; margin-bottom: 6px; color: var(--fs-orange-dark); }
.fcp-wd-callout ul { margin: 0; padding-left: 18px; }
.fcp-wd-callout li { margin: 2px 0; }
.fcp-wd-callout-eg { display: block; margin-top: 8px; font-size: 12px; color: var(--fs-muted); font-weight: 600; }

.fcp-wd-pages { display: flex; flex-direction: column; gap: 12px; }
.fcp-wd-page { border: 1px solid var(--fs-border); border-radius: 14px; background: #fff; overflow: hidden; transition: box-shadow var(--fs-transition); }
.fcp-wd-page:has(.fcp-wd-page-body:not([hidden])) { box-shadow: var(--fs-shadow); border-color: #d9d9de; }
.fcp-wd-page-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; cursor: pointer; background: linear-gradient(180deg, #fff, #fbfbfd); }
.fcp-wd-page-num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: var(--fs-dark); color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.fcp-wd-page-title { flex: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; min-width: 0; }
.fcp-wd-page-title input, .fcp-wd-page-title select { padding: 9px 12px; font-size: 14px; background: #fff; }
.fcp-wd-page-name { font-weight: 700 !important; }
.fcp-wd-page-tools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.fcp-wd-page-tools button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--fs-muted); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; font-family: inherit; }
.fcp-wd-page-tools button:hover { background: var(--fs-bg); border-color: var(--fs-border); color: var(--fs-text); }
.fcp-wd-page-tools button:disabled { opacity: .3; cursor: default; }
.fcp-wd-page-tools button:disabled:hover { background: transparent; border-color: transparent; }
.fcp-wd-page-toggle svg { transition: transform .2s; }
.fcp-wd-page-toggle[aria-expanded='true'] svg { transform: rotate(180deg); }
.fcp-wd-page-state { width: 10px; height: 10px; border-radius: 50%; background: var(--wd-empty); margin-right: 6px; }
.fcp-wd-page-state.is-partial { background: var(--wd-warn); }
.fcp-wd-page-state.is-complete { background: var(--wd-ok); }
.fcp-wd-page-body { padding: 4px 18px 16px; border-top: 1px solid var(--fs-border); }
.fcp-wd-page-body[hidden] { display: none; }
.fcp-wd-guide { margin: 14px 0 18px; padding: 12px 14px; background: var(--fs-bg); border-radius: 12px; font-size: 13px; }
.fcp-wd-guide strong { display: block; margin-bottom: 4px; }
.fcp-wd-guide ul { margin: 0; padding-left: 18px; color: var(--fs-muted); }
.fcp-wd-guide li { margin: 2px 0; }
.fcp-wd-page-foot { margin-top: 14px; display: flex; justify-content: flex-end; }
.fcp-wd-page-remove { background: none; border: none; color: var(--fs-muted); font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-family: inherit; }
.fcp-wd-page-remove:hover { color: var(--fs-error-tx); }
.fcp-wd-pages-foot { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* ── Review ───────────────────────────────────────────────── */
.fcp-wd-review-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.fcp-wd-review-stat { background: var(--fs-bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fcp-wd-review-stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fs-muted); }
.fcp-wd-review-stat strong { font-family: var(--fs-font-display); font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcp-wd-checklist { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.fcp-wd-checkitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--fs-border); background: #fff; font-size: 13.5px; }
.fcp-wd-checkitem-state { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--wd-empty); flex-shrink: 0; position: relative; }
.fcp-wd-checkitem.is-partial .fcp-wd-checkitem-state { border-color: var(--wd-warn); background: var(--wd-warn-bg); }
.fcp-wd-checkitem.is-complete .fcp-wd-checkitem-state { border-color: var(--wd-ok); background: var(--wd-ok); }
.fcp-wd-checkitem.is-complete .fcp-wd-checkitem-state::after { content: ''; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fcp-wd-checkitem-label { flex: 1; font-weight: 600; }
.fcp-wd-checkitem::after { content: 'Not started'; font-size: 11px; color: var(--fs-muted); order: 2; }
.fcp-wd-checkitem.is-partial::after { content: 'In progress'; color: #b45309; }
.fcp-wd-checkitem.is-complete::after { content: 'Complete'; color: #166534; }
.fcp-wd-checkitem-go { order: 3; background: none; border: 1px solid var(--fs-border); border-radius: 8px; padding: 4px 9px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--fs-text); }
.fcp-wd-checkitem-go:hover { border-color: var(--fs-orange); color: var(--fs-orange-dark); }
.fcp-wd-issues { background: var(--wd-warn-bg); border: 1px solid #fde68a; border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 13.5px; }
.fcp-wd-issues[hidden] { display: none; }
.fcp-wd-issues strong { color: #92400e; display: block; margin-bottom: 4px; }
.fcp-wd-issues ul { margin: 0; padding-left: 18px; }
.fcp-wd-issue-go { background: none; border: none; padding: 2px 0; font: inherit; color: #92400e; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.fcp-wd-submit-row { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--fs-border); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fcp-wd-submit { font-size: 15px; padding: 14px 26px; }
.fcp-wd-submit:disabled { opacity: .55; cursor: not-allowed; }
.fcp-wd-submit-row .fcp-wd-hint { margin: 0; max-width: 460px; }

/* ── Footer bar ───────────────────────────────────────────── */
.fcp-wd-footbar { position: sticky; bottom: 0; z-index: 5; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--fs-border); border-radius: 14px; box-shadow: var(--fs-shadow); }
.fcp-wd-footbar .fcp-wd-next[hidden] { display: none; }
.fcp-wd-footbar .fcp-wd-savestate { flex: 1; justify-content: center; }

/* ── Locked ───────────────────────────────────────────────── */
.fcp-wd.is-locked .fcp-wd-drop, .fcp-wd.is-locked .fcp-wd-row-add, .fcp-wd.is-locked .fcp-wd-row-remove, .fcp-wd.is-locked .fcp-wd-page-add, .fcp-wd.is-locked .fcp-wd-page-remove, .fcp-wd.is-locked .fcp-wd-page-move, .fcp-wd.is-locked .fcp-wd-stepper-btn, .fcp-wd.is-locked .fcp-wd-file-remove, .fcp-wd.is-locked .fcp-wd-pages-foot, .fcp-wd.is-locked .fcp-wd-submit-row { display: none !important; }
.fcp-wd.is-locked .fcp-wd-chip, .fcp-wd.is-locked .fcp-wd-seg-opt { pointer-events: none; }
.fcp-wd.is-locked .fcp-wd-check--big:has(input:checked) { border-color: var(--fs-border); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 980px) {
    .fcp-wd-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .fcp-wd-steps { position: static; background: var(--fs-bg); margin: 0; padding: 0 0 4px; border-bottom: 1px solid var(--fs-border); min-width: 0; max-width: 100%; overflow: hidden; }
    .fcp-wd-steplist { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
    .fcp-wd-steplist::-webkit-scrollbar { display: none; }
    .fcp-wd-steplist li { flex-shrink: 0; }
    .fcp-wd-step { width: auto; padding: 6px 10px 6px 6px; border-radius: 999px; background: #fff; border-color: var(--fs-border); gap: 8px; }
    .fcp-wd-step.is-active { border-color: var(--fs-orange); }
    .fcp-wd-step-num { width: 24px; height: 24px; font-size: 11px; }
    .fcp-wd-step-blurb { display: none; }
    .fcp-wd-step-label { font-size: 12.5px; white-space: nowrap; }
    .fcp-wd-steps-foot { display: none; }
    .fcp-wd-hero-side { width: 100%; justify-content: space-between; }
    .fcp-wd-panel { padding: 22px 18px 20px; }
    .fcp-wd-pagecount { grid-template-columns: 1fr; }
    .fcp-wd-review-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fcp-wd-checklist { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .fcp-wd-grid { grid-template-columns: 1fr; }
    .fcp-wd-row-grid--example, .fcp-wd-row-grid--service, .fcp-wd-row-grid--testimonial, .fcp-wd-row-grid--faq { grid-template-columns: 1fr; }
    .fcp-wd-page-title { grid-template-columns: 1fr; }
    .fcp-wd-page-tools .fcp-wd-page-move { display: none; }
    .fcp-wd-hero-copy h1 { font-size: 24px; }
    .fcp-wd-footbar { padding: 10px 12px; }
    .fcp-wd-footbar .fcp-wd-savestate { display: none; }
    .fcp-wd-files { grid-template-columns: 1fr; }
    .fcp-wd-lockbar { padding: 14px 16px; }
}
@media print {
    .fcp-wd-steps, .fcp-wd-footbar, .fcp-wd-drop { display: none !important; }
    .fcp-wd-panel[hidden] { display: block !important; }
}
.fcp-wd-pages-empty { display: flex; flex-direction: column; gap: 4px; padding: 22px; border: 2px dashed var(--fs-border); border-radius: 14px; text-align: center; color: var(--fs-muted); font-size: 13.5px; }
.fcp-wd-pages-empty strong { color: var(--fs-text); }

/* ── Guest (no login) ─────────────────────────────────────── */
.fcp-wd-guest-note { margin: 10px 0 0 !important; font-size: 13.5px !important; color: var(--fs-orange-dark) !important; font-weight: 600; }
.fcp-wd-resume { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px 20px; align-items: center; background: var(--fs-surface); border: 1px solid var(--fs-border); border-radius: var(--fs-radius); padding: 14px 18px; margin: 0 0 20px; box-shadow: var(--fs-shadow); }
.fcp-wd-resume-copy { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.fcp-wd-resume-copy span { color: var(--fs-muted); }
.fcp-wd-resume-form { display: flex; gap: 8px; align-items: stretch; }
.fcp-wd-resume-form input[type='email'] { flex: 1; min-width: 0; min-height: 40px !important; padding: 8px 12px !important; }
.fcp-wd-resume-form .fcp-btn { white-space: nowrap; }
.fcp-wd-resume-msg { grid-column: 1 / -1; margin: 0 !important; min-height: 0; }
.fcp-wd-resume-msg:empty { display: none; }
.fcp-wd-resume-msg.is-ok { color: #166534; font-weight: 600; }
.fcp-wd-resume-msg.is-error { color: var(--fs-error-tx); font-weight: 600; }
.fcp-wd-yourdetails { background: #fff7ee; border: 1px solid rgba(255,133,0,.28); border-radius: 14px; padding: 16px 18px 6px; margin-bottom: 18px; }
.fcp-wd-yourdetails h3 { margin: 0 0 4px; font-size: 16px; font-family: var(--fs-font-display); }
.fcp-wd-yourdetails .fcp-wd-grid { margin-bottom: 8px; }
.fcp-wd .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 720px) {
    .fcp-wd-resume { grid-template-columns: 1fr; }
    .fcp-wd-resume-form { flex-direction: column; }
}

/* ============================================================
   Theme guard — the portal runs inside Astra, which styles bare
   <button> elements (orange background, WHITE text on hover/focus).
   Every control below therefore states its own colours for EVERY
   state; never rely on inheriting the base rule on hover.
   ============================================================ */
.fcp-wd button {
    -webkit-appearance: none;
    appearance: none;
    text-transform: none;
    letter-spacing: normal;
    text-decoration: none;
    line-height: 1.3;
}
.fcp-wd button:not(.fcp-btn),
.fcp-wd button:not(.fcp-btn):hover,
.fcp-wd button:not(.fcp-btn):focus,
.fcp-wd button:not(.fcp-btn):active {
    box-shadow: none;
    text-decoration: none;
}

/* Step list (left menu) */
.fcp-wd .fcp-wd-step,
.fcp-wd .fcp-wd-step:hover,
.fcp-wd .fcp-wd-step:focus,
.fcp-wd .fcp-wd-step:focus-visible,
.fcp-wd .fcp-wd-step:active {
    color: var(--fs-text);
}
.fcp-wd .fcp-wd-step:hover,
.fcp-wd .fcp-wd-step:focus {
    background: var(--fs-surface);
    border-color: var(--fs-border);
}
.fcp-wd .fcp-wd-step:focus-visible {
    outline: 2px solid var(--fs-orange);
    outline-offset: 2px;
}
.fcp-wd .fcp-wd-step.is-active,
.fcp-wd .fcp-wd-step.is-active:hover,
.fcp-wd .fcp-wd-step.is-active:focus {
    background: var(--fs-surface);
    border-color: var(--fs-border);
    color: var(--fs-text);
    box-shadow: var(--fs-shadow);
}
.fcp-wd .fcp-wd-step:hover .fcp-wd-step-label,
.fcp-wd .fcp-wd-step:focus .fcp-wd-step-label { color: var(--fs-text); }
.fcp-wd .fcp-wd-step:hover .fcp-wd-step-blurb,
.fcp-wd .fcp-wd-step:focus .fcp-wd-step-blurb { color: var(--fs-muted); }
/* Step number bubble keeps its state colours on hover */
.fcp-wd .fcp-wd-step:hover .fcp-wd-step-num,
.fcp-wd .fcp-wd-step:focus .fcp-wd-step-num { background: #fff; color: var(--fs-muted); }
.fcp-wd .fcp-wd-step.is-partial:hover .fcp-wd-step-num,
.fcp-wd .fcp-wd-step.is-partial:focus .fcp-wd-step-num { background: var(--wd-warn-bg); color: #b45309; }
.fcp-wd .fcp-wd-step.is-complete:hover .fcp-wd-step-num,
.fcp-wd .fcp-wd-step.is-complete:focus .fcp-wd-step-num { background: var(--wd-ok); color: #fff; }

/* Page-count stepper */
.fcp-wd .fcp-wd-stepper-btn,
.fcp-wd .fcp-wd-stepper-btn:active { background: var(--fs-bg); color: var(--fs-text); }
.fcp-wd .fcp-wd-stepper-btn:hover,
.fcp-wd .fcp-wd-stepper-btn:focus { background: var(--fs-dark); color: #fff; }

/* Page card tools (expand / move) */
.fcp-wd .fcp-wd-page-tools button,
.fcp-wd .fcp-wd-page-tools button:active { background: transparent; color: var(--fs-muted); }
.fcp-wd .fcp-wd-page-tools button:hover,
.fcp-wd .fcp-wd-page-tools button:focus { background: var(--fs-bg); border-color: var(--fs-border); color: var(--fs-text); }
.fcp-wd .fcp-wd-page-tools button:disabled,
.fcp-wd .fcp-wd-page-tools button:disabled:hover { background: transparent; border-color: transparent; color: var(--fs-muted); }

/* Remove buttons (repeater rows + files) */
.fcp-wd .fcp-wd-row-remove,
.fcp-wd .fcp-wd-file-remove,
.fcp-wd .fcp-wd-row-remove:active,
.fcp-wd .fcp-wd-file-remove:active { background: #fff; color: var(--fs-muted); }
.fcp-wd .fcp-wd-row-remove:hover,
.fcp-wd .fcp-wd-row-remove:focus,
.fcp-wd .fcp-wd-file-remove:hover,
.fcp-wd .fcp-wd-file-remove:focus { background: var(--fs-error-bg); border-color: var(--fs-error-tx); color: var(--fs-error-tx); }

/* Text-style buttons */
.fcp-wd .fcp-wd-page-remove,
.fcp-wd .fcp-wd-page-remove:active { background: none; color: var(--fs-muted); }
.fcp-wd .fcp-wd-page-remove:hover,
.fcp-wd .fcp-wd-page-remove:focus { background: none; color: var(--fs-error-tx); }
.fcp-wd .fcp-wd-issue-go,
.fcp-wd .fcp-wd-issue-go:hover,
.fcp-wd .fcp-wd-issue-go:focus,
.fcp-wd .fcp-wd-issue-go:active { background: none; color: #92400e; }
.fcp-wd .fcp-wd-checkitem-go,
.fcp-wd .fcp-wd-checkitem-go:active { background: none; color: var(--fs-text); }
.fcp-wd .fcp-wd-checkitem-go:hover,
.fcp-wd .fcp-wd-checkitem-go:focus { background: #fff; border-color: var(--fs-orange); color: var(--fs-text); }

/* Fields: keep the portal's own field styling regardless of theme rules */
.fcp-wd .fcp-wd-panel input[type='text'],
.fcp-wd .fcp-wd-panel input[type='email'],
.fcp-wd .fcp-wd-panel input[type='url'],
.fcp-wd .fcp-wd-panel input[type='tel'],
.fcp-wd .fcp-wd-panel input[type='number'],
.fcp-wd .fcp-wd-panel textarea,
.fcp-wd .fcp-wd-panel select,
.fcp-wd .fcp-wd-resume-form input[type='email'] {
    background-color: var(--fs-bg);
    color: var(--fs-text);
    border-color: var(--fs-border);
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
}
.fcp-wd .fcp-wd-panel input:focus,
.fcp-wd .fcp-wd-panel textarea:focus,
.fcp-wd .fcp-wd-panel select:focus,
.fcp-wd .fcp-wd-resume-form input:focus {
    background-color: #fff;
    border-color: var(--fs-orange);
    box-shadow: 0 0 0 4px var(--fs-orange-glow);
    color: var(--fs-text);
}
.fcp-wd .fcp-wd-panel input::placeholder,
.fcp-wd .fcp-wd-panel textarea::placeholder { color: var(--fs-muted); opacity: 1; }

/* Chips and segmented control (labels, but the theme also styles those) */
.fcp-wd .fcp-wd-chip,
.fcp-wd .fcp-wd-chip:hover { color: var(--fs-text); }
.fcp-wd .fcp-wd-chip.is-on,
.fcp-wd .fcp-wd-chip.is-on:hover { background: var(--fs-dark); border-color: var(--fs-dark); color: #fff; }
.fcp-wd .fcp-wd-seg-opt { color: var(--fs-muted); }
.fcp-wd .fcp-wd-seg-opt.is-on { color: var(--fs-text); }

/* Drop zone hover: tint the border/background, keep the small print readable */
.fcp-wd .fcp-wd-drop:hover,
.fcp-wd .fcp-wd-drop:focus,
.fcp-wd .fcp-wd-drop:focus-visible,
.fcp-wd .fcp-wd-drop.is-over { color: var(--fs-text); border-color: var(--fs-orange); background: #fff7ee; }
.fcp-wd .fcp-wd-drop:hover .fcp-wd-drop-hint,
.fcp-wd .fcp-wd-drop.is-over .fcp-wd-drop-hint { color: var(--fs-muted); }
.fcp-wd .fcp-wd-drop:hover u,
.fcp-wd .fcp-wd-drop.is-over u { color: var(--fs-orange-dark); }
