/* Export Feasibility Check. Everything is scoped under .efc.
   Brand colours: override these variables in your theme, e.g.  .efc { --efc-accent: #0b5c3b; } */
.efc {
  --efc-accent: #1b4f72;        /* buttons, links, progress (white text on it passes AA) */
  --efc-accent-dark: #123a55;   /* hover */
  --efc-text: #1d2733;          /* body text on white */
  --efc-muted: #4a5663;         /* hints (AA on white) */
  --efc-bg: #ffffff;
  --efc-surface: #f3f6f9;       /* cards */
  --efc-border: #b8c4cf;
  --efc-focus: #b45309;         /* focus ring */
  --efc-red: #9b1c1c;           --efc-red-bg: #fdecec;
  --efc-amber: #6b4200;         --efc-amber-bg: #fff3d1;
  --efc-green: #1e5e3a;         --efc-green-bg: #e3f3e8;
  --efc-grey: #3d4852;          --efc-grey-bg: #e8ecf0;
  --efc-radius: 8px;
  --efc-max: 720px;
}

.efc, .efc *, .efc *::before, .efc *::after { box-sizing: border-box; }

.efc {
  max-width: var(--efc-max);
  margin: 0 auto;
  padding: 16px;
  color: var(--efc-text);
  background: var(--efc-bg);
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  text-align: left;
}

.efc :where(h1, h2, h3, h4, p, ul, ol, dl, fieldset) { margin: 0; padding: 0; }
.efc :where(h1, h2, h3, h4) { color: var(--efc-text); line-height: 1.25; font-weight: 700; letter-spacing: 0; text-transform: none; }
.efc p + p, .efc p + ul, .efc ul + p, .efc p + ol, .efc p + dl, .efc dl + p, .efc ul + h4, .efc p + h4, .efc dl + h4 { margin-top: 10px; }

.efc-main-title { font-size: 1.6rem; margin-bottom: 8px; }
.efc-intro { color: var(--efc-muted); margin-bottom: 16px; }
.efc-title { font-size: 1.3rem; margin: 16px 0 6px; }
.efc-help { color: var(--efc-muted); margin-bottom: 12px; }
.efc-hint { color: var(--efc-muted); font-size: 0.9rem; margin-top: 4px; }

/* Progress */
.efc-progress-text { font-size: 0.9rem; color: var(--efc-muted); margin-bottom: 4px; }
.efc-bar { height: 8px; background: var(--efc-grey-bg); border-radius: 999px; overflow: hidden; }
.efc-bar-fill { height: 100%; background: var(--efc-accent); border-radius: 999px; transition: width 0.2s ease; }

/* Fields */
.efc-field { margin: 18px 0; }
.efc-group { border: 0; min-width: 0; }
.efc-label { display: block; padding: 0; font-weight: 600; margin-bottom: 6px; color: var(--efc-text); float: none; width: auto; }
.efc-star { color: var(--efc-red); }
.efc-opt { font-weight: 400; color: var(--efc-muted); font-size: 0.9rem; }
.efc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.efc-input {
  display: block; width: 100%; min-height: 44px; padding: 8px 12px;
  font: inherit; color: var(--efc-text); background: #fff;
  border: 1px solid var(--efc-border); border-radius: var(--efc-radius);
  box-shadow: none; margin: 0;
}
.efc-input--narrow { max-width: 240px; }
.efc-inline { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.efc-inline .efc-input { width: auto; flex: 0 1 200px; }
.efc-sub { margin-top: 12px; }

.efc-choices { display: grid; gap: 8px; }
.efc-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--efc-border); border-radius: var(--efc-radius); background: #fff; }
.efc-inline .efc-choice { border: 0; padding-left: 0; background: transparent; }
.efc-choice input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--efc-accent); }
.efc-choice label { flex: 1 1 auto; cursor: pointer; margin: 0; font-weight: 400; color: var(--efc-text); }
.efc-choice:has(input:checked) { border-color: var(--efc-accent); background: var(--efc-surface); }
.efc-field--error .efc-input, .efc-field--error .efc-choice { border-color: var(--efc-red); }

.efc-error { color: var(--efc-red); font-weight: 600; margin-top: 6px; }
.efc-error[hidden], .efc-summary[hidden], .efc-sub[hidden] { display: none; }
.efc-summary { background: var(--efc-red-bg); color: var(--efc-red); border: 1px solid var(--efc-red); border-radius: var(--efc-radius); padding: 12px 16px; margin: 12px 0; }
.efc-summary ul { margin-top: 6px; padding-left: 20px; list-style: disc; }
.efc-summary a { color: var(--efc-red); text-decoration: underline; }

.efc-live { background: var(--efc-surface); border-radius: var(--efc-radius); padding: 12px 16px; margin: 18px 0; }
.efc-live-main { font-weight: 700; font-size: 1.1rem; }

/* Honeypot: out of sight, out of tab order, out of screen readers */
.efc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.efc-privacy { color: var(--efc-muted); font-size: 0.9rem; margin: 16px 0; }
.efc a { color: var(--efc-accent); text-decoration: underline; }

/* Buttons */
.efc-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.efc-btn {
  display: inline-block; min-height: 44px; padding: 10px 22px; font: inherit; font-weight: 600;
  text-align: center; text-decoration: none; cursor: pointer; line-height: 1.3;
  border-radius: var(--efc-radius); border: 2px solid var(--efc-accent); box-shadow: none;
}
.efc a.efc-btn--primary, .efc-btn--primary { background: var(--efc-accent); color: #fff; text-decoration: none; }
.efc-btn--primary:hover { background: var(--efc-accent-dark); border-color: var(--efc-accent-dark); }
.efc a.efc-btn--ghost, .efc-btn--ghost { background: #fff; color: var(--efc-accent); text-decoration: none; }
.efc-btn--ghost:hover { background: var(--efc-surface); }
.efc-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Keyboard focus */
.efc input:focus-visible, .efc select:focus-visible, .efc button:focus-visible, .efc a:focus-visible, .efc [tabindex="-1"]:focus-visible {
  outline: 3px solid var(--efc-focus); outline-offset: 2px;
}
.efc [tabindex="-1"]:focus { outline: none; }

/* Notices */
.efc-notice { padding: 12px 16px; border-radius: var(--efc-radius); margin: 12px 0; border: 1px solid var(--efc-border); background: var(--efc-surface); }
.efc-notice--ok { background: var(--efc-green-bg); color: var(--efc-green); border-color: var(--efc-green); }
.efc-notice--error { background: var(--efc-red-bg); color: var(--efc-red); border-color: var(--efc-red); }
.efc-notice .efc-btn { margin-top: 10px; }

/* Result */
.efc-headline { font-size: 1.5rem; padding: 14px 16px; border-radius: var(--efc-radius); border-left: 8px solid; margin: 8px 0 10px; }
.efc-verdict--feasible { background: var(--efc-green-bg); color: var(--efc-green); border-color: var(--efc-green); }
.efc-verdict--conditions { background: var(--efc-amber-bg); color: var(--efc-amber); border-color: var(--efc-amber); }
.efc-verdict--needs_work { background: var(--efc-red-bg); color: var(--efc-red); border-color: var(--efc-red); }
.efc-lead { font-size: 1.05rem; }

.efc-block { background: var(--efc-surface); border-radius: var(--efc-radius); padding: 16px; margin: 18px 0; }
.efc-block-title { font-size: 1.15rem; margin-bottom: 10px; }
.efc-sub-title { font-size: 1rem; margin: 16px 0 6px; }
.efc-big { font-size: 1.25rem; font-weight: 700; }
.efc-block ul, .efc-block ol { padding-left: 22px; }
.efc-block ul { list-style: disc; }
.efc-block ol { list-style: decimal; }
.efc-block li { margin: 6px 0; }
.efc-strong { font-weight: 700; }
.efc-callout { background: #fff; border: 1px solid var(--efc-border); border-left: 4px solid var(--efc-accent); padding: 10px 14px; border-radius: 4px; margin-top: 12px; }

.efc-dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; background: #fff; padding: 10px 14px; border-radius: 4px; }
.efc-dl dt { color: var(--efc-muted); }
.efc-dl dd { margin: 0; font-weight: 700; text-align: right; }

.efc-badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; border: 1px solid; }
.efc-badge--red { background: var(--efc-red-bg); color: var(--efc-red); border-color: var(--efc-red); }
.efc-badge--amber { background: var(--efc-amber-bg); color: var(--efc-amber); border-color: var(--efc-amber); }
.efc-badge--green { background: var(--efc-green-bg); color: var(--efc-green); border-color: var(--efc-green); }
.efc-badge--unsure, .efc-badge--unknown, .efc-badge--na { background: var(--efc-grey-bg); color: var(--efc-grey); border-color: var(--efc-grey); }

.efc-risks li { margin: 10px 0; }
.efc-cta { border: 2px solid var(--efc-accent); border-radius: var(--efc-radius); padding: 16px; margin: 24px 0; }
.efc-cta .efc-btn { margin-top: 12px; }
.efc-mail { margin-top: 12px; }

@media (min-width: 600px) {
  .efc { padding: 24px; }
  .efc-choices--cols { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .efc-bar-fill { transition: none; }
}
