/* Text size: the website's theme sets html { font-size: 10px }, so plain rem came out at
   10px (form text at 12px). --fc-rem is the site's normal text size; every rem in the
   form's CSS is written calc(N * var(--fc-rem)) (tools/scope-css.py does it for the
   generated file). */
:root { --fc-rem: 17px; }
.fc-eforms { font-size: var(--fc-rem); }

/* What the server-rendered pages add to the prototype's stylesheet (app/css/eforms-scoped.css):
   the progress badges and the side list are buttons now (a page is reached by a POST), a
   held file can be dropped, the code step on the review page, the fee on the list. */
.fc-eforms button.progress-step,
.fc-eforms .step-item .sn-go {
  background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: inherit; width: 100%; text-align: inherit;
}
.fc-eforms button.progress-step { width: auto; }
.fc-eforms .step-item .sn-go { width: 100%; }
.fc-eforms .step-item.skipped, .fc-eforms .progress-step.skipped { opacity: 0.35; }
.fc-eforms .conditional-hidden { display: none !important; }
.fc-eforms .file-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fc-eforms .file-wrap .extra-files { flex-basis: 100%; display: grid; gap: 6px; }
.fc-eforms .file-drop { font-size: calc(0.85 * var(--fc-rem)); color: var(--color-error, #d32f2f); }
.fc-eforms .file-drop input { margin-inline-end: 4px; }
.fc-eforms .otp-block { margin-top: 16px; padding: 14px 16px; background: var(--color-primary-light, #f6ecf1); border-radius: var(--radius, 10px); }
.fc-eforms .otp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
/* UI-043 (lead, 2026-11-23): on the number page the OTP ފޮނުވާ button, and the code row after it, in the middle */
.fc-eforms .fc-phone-first .otp-block { text-align: center; }
.fc-eforms .fc-phone-first .otp-block > .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 200px; }
.fc-eforms .fc-phone-first .otp-row { justify-content: center; }
.fc-eforms .form-fee { font-size: calc(0.82 * var(--fc-rem)); color: var(--color-text-secondary, #6b6069); margin-inline-start: 8px; }
.fc-eforms .status-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fc-eforms .status-box input { font-family: var(--font-en, system-ui); letter-spacing: 0.1em; }
/* UI-033: the home's three buttons, one under another; the drafts page's list */
.fc-eforms .home-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; max-width: 360px; margin: 0 auto; }
.fc-eforms .home-actions .hero-btn { justify-content: center; }
.fc-eforms .home-actions .home-btn { min-height: 52px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: calc(1.05 * var(--fc-rem)); background: #fff; }
.fc-eforms .fc-draft-list { margin: 12px 0 20px; }
/* UI-038: each draft with its own delete beside it (asked first) */
.fc-eforms .fc-draft-row { display: flex; align-items: stretch; gap: 8px; margin: 10px 0; }
.fc-eforms .fc-draft-row .fc-draft-item { flex: 1; margin: 0; min-width: 0; }
.fc-eforms .fc-draft-del { flex: none; display: flex; align-items: center; justify-content: center; min-width: 72px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--color-border); border-radius: 12px; background: #fff; color: #8a1f1f; text-decoration: none; font-size: calc(0.9 * var(--fc-rem)); }
.fc-eforms .fc-draft-del:hover, .fc-eforms .fc-draft-del:focus-visible { border-color: #8a1f1f; background: #fdecec; }
.fc-eforms .fc-draft-named { margin: 14px 0; }
.fc-eforms .fc-draft-item { display: block; padding: 16px 18px; margin: 10px 0; border: 1.5px solid var(--color-border); border-radius: 12px; background: #fbf8fa; color: inherit; text-decoration: none; }
.fc-eforms .fc-draft-item:hover, .fc-eforms .fc-draft-item:focus-visible { border-color: var(--color-primary); background: #f6ecf1; }
.fc-eforms .fc-draft-title { display: block; font-weight: 700; line-height: 1.8; }
.fc-eforms .fc-draft-meta { display: block; color: var(--color-text-secondary, #6b6069); font-size: calc(0.88 * var(--fc-rem)); }
.fc-eforms .fc-other-draft { display: flex; flex-direction: column; gap: 10px; }
/* UI-034: the drafts page's lines centred; the clear button under the list */
.fc-eforms .fc-drafts-page .form-instruction, .fc-eforms .fc-drafts-page .fc-other-draft .field-label { text-align: center; }
.fc-eforms .fc-drafts-clear-row { display: flex; justify-content: center; margin: 4px 0 24px; }
/* UI-037: the drafts page's step to a draft started on another phone; the reference pages' instruction centred */
.fc-eforms .fc-drafts-other-row { display: flex; justify-content: center; margin: 8px 0 20px; }
/* UI-042: the note's "މަޢުލޫމާތު ފޮހެލާ" is a link to the delete question, drawn as a small button */
.fc-eforms .fc-draft-note a.fc-draft-clear { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; text-decoration: none; color: #8a1f1f; border: 1.5px solid var(--color-border); border-radius: 10px; background: #fff; }
.fc-eforms .fc-draft-note a.fc-draft-clear:hover, .fc-eforms .fc-draft-note a.fc-draft-clear:focus-visible { border-color: #8a1f1f; background: #fdecec; }
.fc-eforms .fc-draft-note { text-align: center; }
/* UI-039: the ފަހަތަށް row under a page with no way back of its own; links styled as the buttons */
.fc-eforms .fc-back-row { padding-top: 0; }
.fc-eforms .fc-back-row .wizard-nav { margin-top: 8px; }
.fc-eforms .wizard-nav a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.fc-eforms .fc-drafts-other-row .btn { min-height: 48px; display: inline-flex; align-items: center; text-decoration: none; }
.fc-eforms .fc-ref-page .form-instruction { text-align: center; }
.fc-eforms .fc-drafts-clear-row .btn { min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; }
.fc-eforms .fc-other-draft .ref-input { direction: ltr; text-align: center; letter-spacing: 0.12em; font-size: calc(1.2 * var(--fc-rem)); padding: 12px; border: 1.5px solid var(--color-border); border-radius: 10px; }
/* UI-036 (lead, 2026-11-23): every reference box (status page, drafts page): the reference and its
   XXXX-XXXX placeholder in the middle, in a monospace face so the two groups of four line up. Written
   to beat the prototype's rtl.css, which right-aligns every input and placeholder at (0,3,1) */
.fc-eforms[dir] input.ref-input, .fc-eforms[dir] input.ref-input::placeholder {
  direction: ltr; text-align: center; letter-spacing: 0.12em;
  font-family: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, "Liberation Mono", "Courier New", monospace;
}
/* UI-050 (lead, 2026-11-24): every OTP box (number page, review, status page): the code and its 000000
   in the middle, monospace, as the reference box (UI-036) */
.fc-eforms[dir] input.otp-input, .fc-eforms[dir] input.otp-input::placeholder {
  direction: ltr; text-align: center; letter-spacing: 0.3em;
  font-family: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, "Liberation Mono", "Courier New", monospace;
}
/* UI-032: the home's status button (the reference is typed on the status page); full width on a phone */
.fc-eforms .status-box .fc-status-btn { flex: none; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 600px) { .fc-eforms .status-box .fc-status-btn { width: 100%; } }
.fc-eforms .ref-quiet { opacity: 0.7; font-size: calc(0.85 * var(--fc-rem)); }
.fc-eforms .date-wrap { position: relative; display: flex; align-items: center; gap: 6px; }
.fc-eforms .date-native { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fc-eforms .date-cal { background: none; border: 1px solid var(--color-border, #e6dee2); border-radius: 6px; padding: 6px; cursor: pointer; color: var(--color-primary, #6d1a41); }
.fc-eforms .step-errors ul { margin: 6px 0 0; padding-inline-start: 18px; }
.fc-eforms .step-err-link { background: none; border: 0; padding: 0; color: var(--color-primary, #6d1a41); text-decoration: underline; cursor: pointer; font: inherit; }
.fc-eforms .form-list a { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fc-eforms .wizard-nav button[style*="visibility:hidden"] { pointer-events: none; }

/* The landing page, the status page and the receipt: the prototype kept these rules inside
   index.html and demo-status.html rather than in its stylesheet; carried over, scoped. */
.fc-eforms .home-wrap { max-width: 880px; margin: 0 auto; padding: 12px 18px 48px; }
.fc-eforms .hero { background: linear-gradient(170deg, #fbeef4 0%, #f7f4f6 78%); border-radius: 24px; padding: 52px 40px 46px; margin: 24px 0 24px; text-align: center; }
.fc-eforms .hero h1 { color: var(--color-primary-dark); margin: 0 0 16px; font-size: calc(2.1 * var(--fc-rem)); line-height: 1.75; font-weight: normal; font-family: var(--fc-font-heading); }
.fc-eforms .hero-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--color-primary); color: #fff; font-weight: 700; border: none; padding: 17px 48px; border-radius: 14px; font-size: calc(1.6 * var(--fc-rem)); text-decoration: none; box-shadow: 0 8px 22px rgba(109,26,65,0.30); transition: transform .12s, box-shadow .12s; }
.fc-eforms .hero-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(109,26,65,0.40); }
.fc-eforms .status-box { background: #fff; border-radius: 12px; padding: 14px 18px; margin-bottom: 14px; border: 1px solid var(--color-border); }
.fc-eforms .status-box .lbl { font-size: calc(0.92 * var(--fc-rem)); font-weight: 600; flex: 1; min-width: 220px; }
.fc-eforms .status-box input { direction: ltr; text-align: center; letter-spacing: 1px; border: 1.5px solid var(--color-border); border-radius: 8px; padding: 9px 12px; width: 170px; font-size: calc(0.95 * var(--fc-rem)); }
.fc-eforms .forms-list h2 { font-size: calc(1.15 * var(--fc-rem)); margin: 26px 0 10px; color: var(--color-primary-dark); }
.fc-eforms .form-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fc-eforms .form-list li a { background: #fff; border: 1px solid var(--color-border); border-right: 4px solid var(--color-primary); border-radius: 14px; padding: 14px 18px; text-decoration: none; color: var(--color-text); font-size: calc(1 * var(--fc-rem)); font-weight: 700; line-height: 1.85; transition: box-shadow .12s; }
.fc-eforms .form-list li a:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.07); }
.fc-eforms .ref-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(109, 26, 65, 0.12); }
.fc-eforms .form-instruction { color: var(--color-text-secondary); margin: 8px 0 0; }
.fc-eforms .status-badge { display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--color-primary-light, #f6ecf1); color: var(--color-primary, #6d1a41); font-weight: 600; }
.fc-eforms .status-badge.status-approved, .fc-eforms .status-badge.status-completed { background: #e6f4ea; color: #1e6b33; }
.fc-eforms .status-badge.status-rejected { background: #fdecea; color: #a12121; }
.fc-eforms .status-badge.status-returned { background: #fff3cd; color: #6b4d00; }
.fc-eforms .submit-success-panel { text-align: center; padding: 24px 12px; }
.fc-eforms .success-icon { width: 64px; height: 64px; border-radius: 50%; background: #e6f4ea; color: #1e6b33; font-size: calc(2 * var(--fc-rem)); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.fc-eforms .fc-eforms-link { margin: 12px 0; }

/* The form-finding wizard (the prototype kept these rules inside wizard.html). */
.fc-eforms .wizard-card { max-width: 680px; margin: 22px auto; background: #fff; border-radius: 16px; padding: 32px 34px; box-shadow: 0 6px 24px rgba(69,18,44,0.08); }
.fc-eforms .wizard-q { font-size: calc(1.22 * var(--fc-rem)); font-weight: 700; margin-bottom: 6px; line-height: 1.9; }
.fc-eforms .wizard-opt { display: block; width: 100%; text-align: right; padding: 16px 20px; margin: 10px 0; border: 1.5px solid var(--color-border); border-radius: 12px; background: #fbf8fa; cursor: pointer; font-family: inherit; font-size: calc(1.05 * var(--fc-rem)); transition: all .15s; color: var(--color-text); }
/* UI-047, UI-048: an address place or a number carried from the wizard and the number page */
.fc-eforms .fc-locked-place { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border: 1.5px solid var(--color-border); border-radius: 10px; background: #f6ecf1; }
.fc-eforms .fc-locked-value { font-weight: 600; margin: 4px 0; }
.fc-eforms .fc-locked-contact .fc-locked-value { padding: 10px 14px; border: 1.5px solid var(--color-border); border-radius: 10px; background: #f6ecf1; text-align: left; }
/* UI-046: a one-tap question in a form, the wizard's buttons */
.fc-eforms .fc-tap-group { margin: 4px 0 8px; }
.fc-eforms .wizard-opt:hover, .fc-eforms .wizard-opt.selected { border-color: var(--color-primary); background: #f6ecf1; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(69,18,44,0.08); }
.fc-eforms .wizard-card .wizard-nav { margin-top: 22px; }
/* UI-029: one address question per screen: where you are (1 / 4), and the question a follow-up belongs to */
.fc-eforms .wizard-count { margin: 0 0 4px; color: var(--color-text-secondary, #6b6069); font-size: calc(0.85 * var(--fc-rem)); direction: ltr; text-align: right; }
/* a follow-up step: the chosen answer stays, marked (a tap on it shows all the answers again);
   the follow-up question below it, indented a little so it reads as part of that answer */
.fc-eforms .wizard-chosen { position: relative; }
/* UI-031: the wizard's completion bar, as the form pages' bar, a little thicker on a phone */
.fc-eforms .wizard-bar { margin-bottom: 14px; }
.fc-eforms .wizard-bar .progress-bar { height: 5px; margin-bottom: 0; }
.fc-eforms .wizard-sub { margin: 18px 0 4px; padding-inline-start: 14px; border-inline-start: 3px solid var(--color-primary, #6d1a41); font-size: calc(1.05 * var(--fc-rem)); font-weight: 700; line-height: 1.9; }
.fc-eforms .wizard-sub ~ .wizard-opt, .fc-eforms .wizard-sub ~ .juris-island { margin-inline-start: 14px; width: calc(100% - 14px); }
.fc-eforms .wizard-back { background: #fff; border: 2px solid var(--color-primary); color: var(--color-primary); cursor: pointer; font-family: inherit; font-size: calc(1.1 * var(--fc-rem)); font-weight: 700; padding: 13px 26px; border-radius: 12px; flex: 1; }
.fc-eforms .wizard-back:hover { background: #f6ecf1; }
.fc-eforms .wizard-restart { background: none; border: 1px solid var(--color-border); color: #7a6b73; cursor: pointer; font-family: inherit; font-size: calc(0.95 * var(--fc-rem)); padding: 13px 18px; border-radius: 12px; }
.fc-eforms .wizard-restart:hover { color: var(--color-primary); border-color: var(--color-primary); }
.fc-eforms .juris-note { background: #fff7e0; border: 1px solid #eedc9a; border-radius: 12px; padding: 16px 20px; margin-bottom: 14px; line-height: 1.85; }
.fc-eforms .juris-note.fail { background: #fdecec; border-color: #f0b4b4; text-align: center; padding: 22px 20px; }
.fc-eforms .juris-note.fail p { margin: 0; font-size: calc(1.15 * var(--fc-rem)); font-weight: 700; color: #8a1f1f; line-height: 2; }
.fc-eforms .juris-q { margin-bottom: 20px; }
.fc-eforms .juris-q .field-label { font-weight: 700; font-size: calc(1.02 * var(--fc-rem)); line-height: 1.9; }
.fc-eforms .juris-island { display: flex; gap: 10px; margin-top: 8px; margin-bottom: 8px; }
.fc-eforms .juris-island.conditional-hidden { display: none; }
.fc-eforms .juris-island select { flex: 1; min-width: 0; }
.fc-eforms .juris-continue { width: 100%; margin-top: 6px; padding: 15px 24px; font-size: calc(1.1 * var(--fc-rem)); }
.fc-eforms .progress-step.prefilled, .fc-eforms .step-item.prefilled { opacity: 0.55; }

/* ── Mobile pass (2026-11-15), Apple HIG and Material 3 as the reference ─────────────────────
   Found by the four-form click-through at 390 and 360 px. Sizes are px, not rem: the website's
   own root size is not ours to rely on. */

/* Text in a field at 16px or more: below that iOS zooms the page when the field is tapped. */
.fc-eforms .field-input, .fc-eforms select, .fc-eforms textarea,
.fc-eforms input[type="text"], .fc-eforms input[type="tel"], .fc-eforms input[type="email"],
.fc-eforms input[type="number"], .fc-eforms .status-box input { font-size: var(--fc-rem); }

/* A focus that can be seen (non-text contrast 3:1), for keyboards and switch access. */
.fc-eforms a:focus-visible, .fc-eforms button:focus-visible, .fc-eforms input:focus-visible,
.fc-eforms select:focus-visible, .fc-eforms textarea:focus-visible, .fc-eforms .field-input:focus {
  outline: 2px solid var(--color-primary, #6d1a41); outline-offset: 2px;
}

/* The link back above every form: it sat white on a light page (1.06:1), 13px, 23px tall.
   Now the theme colour, a full-size target; the arrow points right, the way back in Dhivehi. */
.fc-eforms .back-link {
  color: var(--color-primary, #6d1a41); font-size: var(--fc-rem); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px;
}
.fc-eforms .back-link:hover { color: var(--color-primary-dark, #4a1030); text-decoration: underline; }

@media (max-width: 600px) {
  /* Reading text at 16px. */
  .fc-eforms .field-label, .fc-eforms .form-instruction, .fc-eforms .wizard-opt,
  .fc-eforms .radio-option, .fc-eforms .checkbox-option, .fc-eforms .status-box .lbl { font-size: var(--fc-rem); }
  .fc-eforms .field-hint, .fc-eforms .field-error { font-size: 14px; }
  .fc-eforms .ref-notice-big .dv { font-size: 15px; }

  /* Every control 44 x 44 or more (Apple 44pt, Material 48dp with spacing). */
  .fc-eforms .btn, .fc-eforms .btn-sm, .fc-eforms .date-cal, .fc-eforms .wizard-back,
  .fc-eforms .wizard-restart, .fc-eforms .step-err-link, .fc-eforms .dv-kb-btn {
    min-height: 44px; min-width: 44px;
  }
  .fc-eforms .btn-sm, .fc-eforms .ref-notice-big .btn-sm { font-size: 15px; padding: 8px 14px; }
  .fc-eforms .form-table .btn-sm { min-height: 44px; }
  .fc-eforms .date-cal { display: inline-flex; align-items: center; justify-content: center; }
  .fc-eforms .step-errors li { padding: 6px 0; }

  /* Back and next (stacked full width by form.css below 600px): taller, easier to hit. */
  .fc-eforms .wizard-nav .btn { min-height: 52px; font-size: 17px; }
}

/* ── 0.7.0: UX.md part 2, as the project lead chose on 2026-11-17 ──────────────────────────── */

/* Text only a screen reader hears (the field named in its error, a step's name and state). */
.fc-eforms .fc-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Headings in the website's own heading face, MV Waheed (loaded by the site's theme; Faruma
   where it is missing); body text, labels and fields stay Faruma. Sizes from --fc-rem:
   h1 28px, h2 22px, h3 19px, text 17px. The theme's own h1–h3 rules are overridden here. */
.fc-eforms { --fc-font-heading: "MV Waheed", "Faruma", "FC Thaana", sans-serif; }
.fc-eforms h1, .fc-eforms h2, .fc-eforms h3 { text-transform: none; letter-spacing: normal; }
.fc-eforms h1.form-title, .fc-eforms .form-title-area h1.form-title, .fc-eforms h1.success-title {
  font-family: var(--fc-font-heading); font-size: calc(1.65 * var(--fc-rem)); font-weight: normal;
  color: var(--color-primary-dark, #45122c); line-height: 1.7; margin: 0 0 8px;
}
.fc-eforms h1.wizard-q {
  font-family: var(--fc-font-heading); font-size: calc(1.3 * var(--fc-rem)); font-weight: normal;
  color: var(--color-text, #23131c); line-height: 1.8; margin: 0 0 6px;
}
.fc-eforms h2.section-title {
  font-family: var(--fc-font-heading); font-size: calc(1.3 * var(--fc-rem)); font-weight: normal; line-height: 1.8;
}
.fc-eforms .instructions-block h3.instructions-heading, .fc-eforms h3.court-use-title,
.fc-eforms h3.export-title {
  font-family: var(--fc-font-heading); font-size: calc(1.12 * var(--fc-rem)); font-weight: normal;
  color: var(--color-primary-dark, #45122c); line-height: 1.8;
}
.fc-eforms .instructions-block h3.instructions-heading { margin: 14px 0 6px; }
.fc-eforms .payment-step-panel h3.payment-title { font-family: var(--fc-font-heading); font-weight: normal; }
.fc-eforms[dir="rtl"] h1.form-title .dv, .fc-eforms[dir="rtl"] h2.section-title .dv { line-height: inherit; }

/* One question's radios or ticks: a fieldset, the question its legend (drawn as the label was). */
.fc-eforms fieldset.field-group, .fc-eforms fieldset.attachments-checklist { min-width: 0; margin-inline: 0; }
.fc-eforms fieldset.field-group { border: 0; padding: 0; }
.fc-eforms legend.field-label, .fc-eforms legend.checklist-legend { float: none; width: auto; max-width: 100%; padding: 0; }

/* Radio and tick circles 24px (were 18px), inside the option cards. */
.fc-eforms .radio-option input[type="radio"], .fc-eforms .checkbox-option input[type="checkbox"] { width: 24px; height: 24px; }

/* The progress line (UI-060, lead 2026-11-24; replaces UI-052's badges): the form's milestones
   as icons on one line, done filled in the court's colour, the current one a ring a little
   larger, the rest grey; a section's pages are small dots on the line after its milestone. On a
   phone only the current section's dots show, so the whole form fits at 360 px with no sideways
   scroll; from 720 px every section's dots show. Under the line: the section's name, "3 / 7". */
.fc-eforms .fc-ms { --ms-on: var(--color-primary, #6d1a41); --ms-off: #d6cbd1; --ms-ink-off: #84757d; max-width: 100%; min-width: 0; margin: 0 0 18px; }
.fc-eforms .ms-track { list-style: none; display: flex; align-items: center; min-width: 0; margin: 0; padding: 6px 4px 18px; overflow: hidden; }
.fc-eforms .ms { display: flex; align-items: center; flex: 1 1 0; min-width: 30px; margin: 0; padding: 0; list-style: none; }   /* a milestone and at least 4px of line */
.fc-eforms .ms.ms-current { flex: 3 1 auto; min-width: 64px; }   /* its dots get the room */
.fc-eforms .ms.ms-last { flex: 0 0 auto; min-width: 0; }
.fc-eforms .ms-node {
  position: relative; flex: none; box-sizing: border-box; width: 26px; height: 26px; min-width: 0; min-height: 0;
  margin: 0; padding: 0; border-radius: 50%; border: 2px solid var(--ms-off); background: #fff; color: var(--ms-ink-off);
  display: inline-flex; align-items: center; justify-content: center; font: inherit; line-height: 1; box-shadow: none;
}
.fc-eforms .ms-node svg { width: 14px; height: 14px; }
.fc-eforms button.ms-node { cursor: pointer; }
.fc-eforms .ms-done .ms-node { background: var(--ms-on); border-color: var(--ms-on); color: #fff; }
.fc-eforms .ms-seen .ms-node { color: var(--ms-on); }
.fc-eforms .ms-current .ms-node { width: 32px; height: 32px; border: 3px solid var(--ms-on); color: var(--ms-on); box-shadow: 0 0 0 3px var(--color-primary-light, #f6ecf1); }
.fc-eforms .ms-current .ms-node svg { width: 16px; height: 16px; }
.fc-eforms button.ms-node:hover { box-shadow: 0 0 0 4px var(--color-primary-light, #f6ecf1); }
.fc-eforms button.ms-node:focus-visible, .fc-eforms button.ms-dot:focus-visible { outline: 3px solid var(--ms-on); outline-offset: 3px; }
.fc-eforms .ms-num {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px;
  font: 600 10px/1 var(--fc-font-latin, system-ui, sans-serif); color: var(--ms-ink-off); direction: ltr; white-space: nowrap; pointer-events: none;
}
.fc-eforms .ms-done .ms-num, .fc-eforms .ms-current .ms-num { color: var(--ms-on); }
.fc-eforms .ms-seg { flex: 1 1 auto; min-width: 4px; display: flex; align-items: center; }
.fc-eforms .ms-line { flex: 1 1 0; min-width: 2px; height: 3px; background: var(--ms-off); }
.fc-eforms .ms-line.on { background: var(--ms-on); }
.fc-eforms .ms-dot {
  position: relative; flex: 0 1 8px; box-sizing: border-box; width: 8px; min-width: 3px; height: 8px; min-height: 0;
  margin: 0; padding: 0; border: 0; border-radius: 4px; background: var(--ms-off); font: inherit;
}
.fc-eforms .ms-dot.on { background: var(--ms-on); }
.fc-eforms .ms-dot.seen { background: #fff; box-shadow: inset 0 0 0 2px var(--ms-on); }
.fc-eforms .ms-dot.now { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--ms-on); }
.fc-eforms button.ms-dot { cursor: pointer; }
.fc-eforms button.ms-dot::before { content: ""; position: absolute; inset: -10px -4px; }   /* a larger place to tap */
.fc-eforms .ms:not(.ms-current) .ms-dot { display: none; }
.fc-eforms .ms-now { margin: 2px 0 0; text-align: center; font-size: calc(0.9 * var(--fc-rem)); line-height: 1.8; color: var(--color-text-secondary, #6b6069); }
.fc-eforms .ms-now-name { color: var(--color-primary-dark, #45122c); }
.fc-eforms .ms-now-count { margin-inline-start: 8px; font-family: var(--fc-font-latin, system-ui, sans-serif); font-weight: 600; color: var(--ms-on); white-space: nowrap; }
@media (min-width: 720px) {
  .fc-eforms .ms-node { width: 38px; height: 38px; }
  .fc-eforms .ms-node svg { width: 20px; height: 20px; }
  .fc-eforms .ms-current .ms-node { width: 46px; height: 46px; }
  .fc-eforms .ms-current .ms-node svg { width: 22px; height: 22px; }
  .fc-eforms .ms-num { font-size: 12px; margin-top: 4px; }
  .fc-eforms .ms:not(.ms-current) .ms-dot { display: block; }
  .fc-eforms .ms.ms-current { flex: 1 1 0; }
  .fc-eforms .ms-track { padding-bottom: 20px; }
}
@media print { .fc-eforms .fc-ms { display: none; } }

/* Errors: the list above the page takes the focus; each entry names the field. */
.fc-eforms .step-errors { margin: 0 0 18px; }
.fc-eforms .step-errors:focus { outline: 3px solid var(--color-error, #d32f2f); outline-offset: 2px; }
.fc-eforms .step-err-link { text-align: start; line-height: inherit; }

/* "Start again": at the foot, below Continue and Back, the same button as ފަހަތަށް (lead, 2026-11-23,
   UI-026); it asks on a page of its own before anything is cleared. */
.fc-eforms .form-restart-row { display: flex; justify-content: center; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--color-border, #e6dee2); }
.fc-eforms .form-restart-row .form-restart-btn { min-height: 44px; }
.fc-eforms .restart-confirm .restart-actions { margin-top: 24px; gap: 12px; }

/* Test mode (FC_EFORMS_TEST_MODE, dev only; docs/TESTING.md): one small round button in the
   corner of each form page opens the fill box. Nothing on the page says "test" (0.15.3). */
.fc-eforms .fc-seed { position: fixed; left: 16px; bottom: 16px; z-index: 50; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: calc(0.9 * var(--fc-rem)); line-height: 1.5; text-align: left; }
.fc-eforms .fc-seed-toggle { list-style: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid #d9cfd6; color: #6b6069; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); cursor: pointer; opacity: 0.55; }
.fc-eforms .fc-seed-toggle::-webkit-details-marker { display: none; }
.fc-eforms .fc-seed-toggle:hover, .fc-eforms .fc-seed-toggle:focus-visible, .fc-eforms .fc-seed[open] .fc-seed-toggle { opacity: 1; color: var(--color-primary, #6d1a41); }
.fc-eforms .fc-seed-box { position: absolute; left: 0; bottom: 56px; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 96px); overflow: auto; padding: 14px 16px; background: #fff; border: 1px solid #d9cfd6; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.fc-eforms .fc-seed .fc-seed-title { margin: 0 0 8px; }
.fc-eforms .fc-seed label { display: block; margin-bottom: 4px; }
.fc-eforms .fc-seed input { direction: ltr; text-align: left; width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid #d9cfd6; border-radius: 8px; font-size: var(--fc-rem); }
/* the prototype's rtl.css right-aligns every input and placeholder at (0,3,1); the fill box is English */
.fc-eforms[dir] .fc-seed input:not(#seedName), .fc-eforms[dir] .fc-seed input:not(#seedName)::placeholder { text-align: left; }
.fc-eforms .fc-seed input + label { margin-top: 10px; }
.fc-eforms .fc-seed #seedName { direction: rtl; text-align: right; font-family: Faruma, "MV Faseyha", sans-serif; }
.fc-eforms .fc-seed .fc-seed-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.fc-eforms .fc-seed .fc-seed-actions .btn { min-height: 44px; }
.fc-eforms .fc-seed .fc-seed-error { color: #8a1f1f; margin: 6px 0 0; font-weight: 600; }
.fc-eforms .fc-seed .fc-seed-note { margin: 8px 0 0; color: #6b6069; font-size: calc(0.85 * var(--fc-rem)); }
/* room below the page so the corner button never covers Back or Continue at the foot */
.fc-eforms:has(.fc-seed) { padding-bottom: 64px; }

/* ── 0.9.1: Mixed Dhivehi and English (docs/THEME.md) ─────────────────────────────────────────
   The pages are right to left (the container is dir="rtl" lang="dv"). English is marked
   lang="en" dir="ltr" on the element that holds it, or a <span class="fc-en" lang="en"
   dir="ltr"> round the run inside a Dhivehi sentence (FC_EForms_Render::mixed(), setMixed() in
   the script); codes (a reference, a phone number, a date, an email) are isolated with
   dir="ltr" or <bdi dir="ltr">. Marked English reads in the system's Latin face, not the
   Thaana fonts (the prototype's --font-en starts with FC Thaana). */
.fc-eforms { --fc-font-latin: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif; }
.fc-eforms [lang="en"] { --font-en: var(--fc-font-latin); font-family: var(--fc-font-latin); }
.fc-eforms [lang="en"] [lang="dv"], .fc-eforms [lang="en"] .dv { font-family: var(--font-dv); }
/* inside a line of Dhivehi: kept apart from the text around it, in its own direction */
.fc-eforms [dir="ltr"], .fc-eforms bdi { unicode-bidi: isolate; }
/* 0.9.2: the dir attribute is only a default; the website theme's custom.css sets
   "p, td { direction: rtl }", which beat it, so marked English in a paragraph or a table cell
   still ran right to left (the full stop at the wrong end). The plugin's own marks win here. */
.fc-eforms [dir="ltr"] { direction: ltr; }
.fc-eforms [dir="rtl"] { direction: rtl; }
.fc-eforms .fc-en { font-size: 0.94em; }   /* the Latin face runs larger than Faruma at one size */
/* a whole block in English starts at the left (low specificity, (0,1,0): a component's own
   alignment wins) */
.fc-eforms :where(p, div, li, label):where([lang="en"]) { text-align: left; }
/* fields that take a code, a number, a date or an email: typed left to right, though the
   prototype's rtl.css turns every input right to left; they keep the form's right edge, as the
   prototype's phone and date fields do */
.fc-eforms[dir="rtl"] input[dir="ltr"], .fc-eforms[dir="rtl"] input[dir="ltr"]::placeholder { direction: ltr; }
/* the browser copy of the draft (ADR-010 step 2): the notice after a reload, the note under the form;
   shown by the script only ([hidden] wins over the notice's own display) */
.fc-eforms .fc-draft-restored[hidden], .fc-eforms .fc-draft-note[hidden], .fc-eforms .fc-draft-cleared[hidden] { display: none; }
.fc-eforms .fc-draft-restored .fc-draft-undo { margin-inline-start: 8px; }
/* UI-062: the email box, its reason and the review's notice line show only for a number abroad
   (the script, or the server for a number abroad); without scripts a <noscript> rule shows the box */
.fc-eforms .fc-email-abroad[hidden], .fc-eforms .fc-email-why[hidden], .fc-eforms .fc-notify-home[hidden], .fc-eforms .fc-notify-abroad[hidden] { display: none; }
.fc-eforms .fc-draft-note { margin: 16px 0 0; text-align: center; }
.fc-eforms .fc-draft-note .field-hint { margin: 0 0 8px; }

/* ── 0.15.45: launch check for B32, B33, B15 (2026-11-24) ────────────────────────────────────── */
/* The review page: a table's rows, one line each under the table's own label (review_summary). */
.fc-eforms .review-table-head .review-label { color: var(--color-text, #2b2129); font-weight: 600; }
.fc-eforms .review-table-row .review-label { padding-inline-start: 8px; }
/* A table on a phone: every table stacked, a card per row with each column's name above its box
   (the .table-stacked pattern, until now only for four columns or more); no sideways scroll. */
@media (max-width: 600px) {
  .fc-eforms .table-wrap .form-table-wrapper { overflow: visible; background: none; border: 0; }
  .fc-eforms .table-wrap .form-table, .fc-eforms .table-wrap .form-table tbody, .fc-eforms .table-wrap .form-table tr, .fc-eforms .table-wrap .form-table td { display: block; width: auto; }
  .fc-eforms .table-wrap .form-table thead { display: none; }
  .fc-eforms .table-wrap .form-table tr { border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 10px 14px 6px; margin: 0 0 12px; background: #fff; }
  .fc-eforms .table-wrap .form-table td { border: 0; padding: 4px 0 8px; min-width: 0 !important; text-align: start; }
  .fc-eforms .table-wrap .form-table td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: calc(0.86 * var(--fc-rem)); color: var(--color-text-secondary, #6b5b63); margin-bottom: 4px; }
  .fc-eforms .table-wrap .form-table td.row-num { font-weight: 700; color: var(--color-primary-dark); border-bottom: 1px solid var(--color-border); margin-bottom: 6px; }
  .fc-eforms .table-wrap .form-table input[type="text"]:not([hidden]), .fc-eforms .table-wrap .form-table input[type="number"]:not([hidden]), .fc-eforms .table-wrap .form-table select:not([hidden]) { display: block; width: 100%; }
}
/* An answer's follow-up box shows only while one of its questions shows: a slot whose questions are
   all hidden (the "yes" box while "no" is chosen) drew a grey bar, as :empty never matched it. */
.fc-eforms .option-followup:not(:has(> :not(.conditional-hidden):not([hidden]))) { display: none; }
/* Q07 quick exit (B32, B33, B15): at the top of every page, kept in view while scrolling, at the
   left (the end of a right-to-left line), away from ކުރިއަށް; the theme's accent, 44px high. */
.fc-eforms .fc-quick-exit-bar { position: sticky; top: calc(8px + var(--wp-admin--admin-bar--height, 0px)); z-index: 60; display: flex; justify-content: flex-end; margin: 0 0 8px; pointer-events: none; }
.fc-eforms .fc-quick-exit { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch, 44px); padding: 4px 14px; border-radius: var(--radius-sm, 6px); background: var(--color-accent, #a52056); color: var(--color-on-primary, #fff); font-weight: 700; font-size: calc(0.9 * var(--fc-rem)); line-height: 1.3; text-decoration: none; box-shadow: var(--shadow-md); }
.fc-eforms .fc-quick-exit:hover, .fc-eforms .fc-quick-exit:focus-visible { background: var(--color-primary-dark, #45122c); color: var(--color-on-primary, #fff); text-decoration: none; }
.fc-eforms .fc-quick-exit:focus-visible { outline: 3px solid var(--color-warning, #f9a825); outline-offset: 2px; }
.fc-eforms .fc-quick-exit .fc-quick-exit-en { font-weight: 600; font-size: 0.85em; }
html.fc-quick-exiting body { visibility: hidden; }
