/* MHACBO forms: the look of every form (structure in docs/STYLING.md). Design: Claude Design
   handoff "QMHA Assessment Form", 2026-10-22. Forms run inside host pages whose background is
   white, so the theme is pinned light: a visitor on a dark OS would otherwise get a dark box in
   a light page. */
:root {
  --mf-header: #123f38;
  --mf-brand: #0e5c4f;
  --mf-brand-hover: #0a4a3f;
  --mf-on-green: #e8e6df;
  --mf-on-green-dim: #d3e6df;
  --mf-on-green-gold: #f1d27a;
  --mf-gold: #d4a72c;
  --mf-gold-ink: #7a5c0c;
  --mf-ink: #121a16;
  --mf-dim: #4c5c54;
  --mf-faint: #5f6e66;
  --mf-line: #cfcabd;
  --mf-hairline: #ddd8ca;
  --mf-track: #e6e2d6;
  --mf-dot: #8a958f;
  --mf-selected-row: #fbf5e2;
  --mf-green: #2f8a55;
  --mf-amber: #e0a63c;
  --mf-red: #b23a26;
  --mf-on-green-line: rgba(255, 255, 255, .18);
  --mf-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mf-serif: "Source Serif 4", Georgia, serif;
  --mf-mono: "DM Mono", ui-monospace, Consolas, monospace;
  /* Shape-plus-color icons: severity is never color alone. */
  --mf-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='7' fill='%232f8a55'/%3E%3Cpath d='M4 7.2l2 2 4-4.2' stroke='%23fff' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  --mf-icon-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 1L11.5 11H.5z' fill='%23b23a26'/%3E%3C/svg%3E");
  --mf-icon-amber: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 1L11.5 11H.5z' fill='%23e0a63c'/%3E%3C/svg%3E");
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; background: #ffffff; color: var(--mf-ink); }
body { font: 15px/1.5 var(--mf-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--mf-gold-ink); text-decoration: underline; text-underline-offset: 2px; }
::placeholder { color: var(--mf-dot); }
.mf-mono { font-family: var(--mf-mono); }

.mf-wrap { max-width: 1080px; margin: 0 auto; padding: 48px 24px 96px; }
/* Embedded: fluid (shrinks with the host) up to a comfortable reading width, then centered, with a
   side buffer so it never touches the edges. Without the cap a 39" ultrawide stretched every field
   across the screen (Van, 2026-10-22). */
.mf-embedded .mf-wrap { max-width: var(--mf-max, 1320px); margin: 0 auto; padding: 8px clamp(16px, 3vw, 32px) 24px; }
/* The host sets --mf-max with data-max-width on the embed tag (embed.js → ?mw= → form.js). */

/* Sticky progress bar (direct link only; inside an iframe "sticky" has nothing to stick to). */
.mf-progress { position: sticky; top: 0; z-index: 10; background: var(--mf-brand); color: var(--mf-on-green); border-bottom: 1px solid var(--mf-on-green-line); }
.mf-progress-row { max-width: 1080px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 16px; }
.mf-progress-brand { font: 11px var(--mf-mono); letter-spacing: .12em; color: var(--mf-on-green-gold); }
.mf-progress-title { font-size: 13px; color: var(--mf-on-green-dim); flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-progress-count { font: 11px var(--mf-mono); letter-spacing: .04em; }
.mf-progress-track { height: 2px; background: var(--mf-on-green-line); }
.mf-progress-fill { height: 2px; width: 0; background: var(--mf-gold); transition: width .3s ease; }

/* Directions header */
.mf-header { background: var(--mf-header); color: var(--mf-on-green); border-radius: 6px; padding: 40px clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 28px; margin-bottom: 48px; }
.mf-header-top { display: flex; flex-direction: column; gap: 12px; }
.mf-header-block { display: flex; flex-direction: column; gap: 10px; }
.mf-eyebrow { font: 11px var(--mf-mono); letter-spacing: .12em; color: var(--mf-on-green-gold); }
.mf-eyebrow.mf-dim { color: var(--mf-on-green-dim); }
.mf-title { font: 600 clamp(28px, 6vw, 38px)/1.15 var(--mf-serif); letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.mf-wrap > .mf-title { color: var(--mf-brand); margin-bottom: 8px; }
.mf-intro { margin: 0 0 32px; color: var(--mf-dim); }
.mf-directions { margin: 0; font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.mf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); border: 1px solid var(--mf-on-green-line); border-radius: 4px; }
.mf-fact { padding: 18px 22px; display: flex; gap: 18px; align-items: baseline; }
.mf-fact + .mf-fact { border-left: 1px solid var(--mf-on-green-line); }
.mf-fact-value { font: 28px/1 var(--mf-mono); color: var(--mf-on-green-gold); }
.mf-fact-text { display: flex; flex-direction: column; gap: 2px; }
.mf-fact-text strong { font-weight: 600; font-size: 15px; }
.mf-fact-text span { font-size: 14px; color: var(--mf-on-green-dim); text-wrap: pretty; }
.mf-footnote { font: 12px var(--mf-mono); color: var(--mf-on-green-dim); }

/* Sections */
.mf-section { padding: 0 0 56px; display: flex; flex-direction: column; gap: 28px; }
.mf-section-rating { padding-bottom: 48px; gap: 4px; }
.mf-bar { background: var(--mf-brand); color: var(--mf-on-green); border-radius: 4px; padding: 18px clamp(16px, 4vw, 28px); display: flex; flex-wrap: wrap; gap: 12px clamp(14px, 3vw, 22px); align-items: center; }
.mf-section-rating .mf-bar { margin-bottom: 8px; }
.mf-bar-num { font: 30px/1 var(--mf-mono); color: var(--mf-on-green-gold); }
.mf-bar-rule { width: 1px; align-self: stretch; background: rgba(255, 255, 255, .22); }
.mf-bar-text { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mf-bar-text h2 { font: 600 clamp(21px, 4.5vw, 26px)/1.2 var(--mf-serif); margin: 0; }
.mf-bar-text p { margin: 0; color: var(--mf-on-green-dim); font-size: 14px; }
.mf-chip { flex: none; white-space: nowrap; font: 12px var(--mf-mono); border: 1px solid rgba(255, 255, 255, .22); border-radius: 3px; padding: 4px 10px; }

.mf-fields { display: flex; flex-wrap: wrap; gap: 28px 16px; }
.mf-field { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mf-w-third { flex: 1 1 240px; }
.mf-w-twothirds { flex: 3 1 360px; }
/* Side-by-side fields: help text goes under the input, so neighbouring labels and boxes line up
   even when only one of them has help (Van, 2026-10-22: credential vs. registry search). */
.mf-w-third > *, .mf-w-twothirds > * { order: 5; }
.mf-w-third > .mf-label, .mf-w-twothirds > .mf-label { order: 0; }
.mf-w-third > input, .mf-w-third > select, .mf-w-third > .mf-affix, .mf-w-third > textarea,
.mf-w-twothirds > input, .mf-w-twothirds > select, .mf-w-twothirds > .mf-affix, .mf-w-twothirds > textarea { order: 1; }
.mf-w-third > .mf-suggest, .mf-w-twothirds > .mf-suggest { order: 2; }
.mf-w-third > .mf-note, .mf-w-twothirds > .mf-note { order: 3; }
.mf-w-third > .mf-help, .mf-w-twothirds > .mf-help { order: 4; }
.mf-label { display: block; font-weight: 600; font-size: 14.5px; margin: 0; }
.mf-req { color: var(--mf-red); }
.mf-help { margin: 0; font-size: 13.5px; color: var(--mf-dim); text-wrap: pretty; }

/* Inputs */
.mf-field input[type=text], .mf-field input[type=email], .mf-field input[type=tel], .mf-field input[type=date],
.mf-field input[type=number], .mf-field select, .mf-field textarea {
  width: 100%; height: 46px; font: 15px var(--mf-sans); color: var(--mf-ink); background: #ffffff;
  border: 1px solid var(--mf-line); border-radius: 3px; padding: 0 14px; outline: none;
}
.mf-field textarea { height: auto; padding: 10px 14px; resize: vertical; }
.mf-field input.mf-mono { font-family: var(--mf-mono); letter-spacing: .02em; }
.mf-field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23121a16' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.mf-field input:focus, .mf-field select:focus, .mf-field textarea:focus { border-color: var(--mf-gold-ink); box-shadow: 0 0 0 3px rgba(212, 167, 44, .3); }
.mf-field [aria-invalid=true]:not([role=radiogroup]) { border-color: var(--mf-red); }
.mf-affix { position: relative; width: 100%; }
.mf-affix input { padding-right: 48px !important; }
.mf-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 12px var(--mf-mono); color: var(--mf-faint); pointer-events: none; }

/* The hours meter */
.mf-with-meter { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mf-with-meter > .mf-affix, .mf-with-meter > input { flex: 0 1 200px; }
.mf-meter { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mf-track { height: 6px; background: var(--mf-track); border-radius: 3px; overflow: hidden; }
.mf-fill { height: 6px; width: 0; border-radius: 3px; background: var(--mf-dot); transition: width .3s ease, background .3s; }
.mf-meter-ok .mf-fill { background: var(--mf-green); }
.mf-meter-short .mf-fill { background: var(--mf-amber); }
.mf-meter-msg { font: 12px var(--mf-mono); color: var(--mf-dim); }

/* Choice cards (the exam) */
.mf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.mf-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: #ffffff; border: 1.5px solid var(--mf-line); border-radius: 4px; cursor: pointer; }
.mf-card:hover { border-color: var(--mf-gold-ink); }
.mf-card:has(input:checked) { border-color: var(--mf-ink); box-shadow: inset 0 0 0 1px var(--mf-ink); }
.mf-card:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(212, 167, 44, .45); }
.mf-card .mf-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--mf-dot); margin-top: 2px; }
.mf-card:has(input:checked) .mf-dot { border: 5px solid var(--mf-ink); background: var(--mf-gold); }
.mf-card-text { display: flex; flex-direction: column; gap: 2px; }
.mf-card-title { font-weight: 600; font-size: 16px; }
.mf-card-detail { font: 12px var(--mf-mono); color: var(--mf-dim); }
.mf-cards[aria-invalid=true] .mf-card { border-color: var(--mf-red); }
/* Radio inputs stay in the page for keyboard and screen readers, drawn by .mf-dot instead. */
.mf-card input, .mf-scale input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

/* Plain radio groups (other forms) */
.mf-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.mf-choices .mf-choice { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.mf-choices .mf-dot { display: none; }
.mf-choices input { width: 20px; height: 20px; accent-color: var(--mf-brand); }

/* Rating items */
.mf-items { display: flex; flex-direction: column; }
.mf-field-scale { padding: 18px 0; border-top: 1px solid var(--mf-hairline); gap: 12px; }
.mf-field-scale .mf-label { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.mf-field-scale .mf-label::before { content: ''; width: 14px; height: 14px; flex: none; display: none; background: var(--mf-icon-check) center / contain no-repeat; }
.mf-field-scale:has(input:checked) .mf-label::before { display: block; }
.mf-field-scale:has([aria-invalid=true]) .mf-label::before { display: block; width: 13px; height: 13px; background-image: var(--mf-icon-warn); }
.mf-field-scale .mf-help { font-size: 14.5px; margin-top: -9px; }

/* Pills: a short companion answer under a rating ("Verified through") */
.mf-field-pills { padding: 0 0 18px; margin-top: -6px; gap: 8px; }
.mf-field-pills .mf-label { font-size: 13px; font-weight: 600; color: var(--mf-dim); }
.mf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.mf-pill { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--mf-line); border-radius: 999px; background: #ffffff; font-size: 14px; cursor: pointer; }
.mf-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.mf-pill .mf-dot { display: none; }
.mf-pill:has(input:checked) { background: var(--mf-brand); border-color: var(--mf-brand); color: #ffffff; font-weight: 600; }
.mf-pill:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(212, 167, 44, .45); }
.mf-pills[aria-invalid=true] .mf-pill { border-color: var(--mf-red); }

/* Wide: a dot scale on a connector line */
.mf-scale-wrap { overflow-x: auto; }
.mf-scale { position: relative; display: grid; grid-template-columns: repeat(5, minmax(max-content, 1fr)); column-gap: 12px; }
.mf-scale::before { content: ''; position: absolute; left: 10%; right: 10%; top: 21px; height: 1.5px; background: var(--mf-line); }
.mf-scale .mf-choice { position: relative; padding: 10px 4px 4px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.mf-scale .mf-dot { width: 24px; height: 24px; border-radius: 50%; background: #ffffff; border: 1.5px solid var(--mf-dot); }
.mf-scale .mf-choice:has(input:checked) .mf-dot { background: var(--mf-gold); border: none; box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--mf-brand); }
.mf-scale .mf-choice:has(input:focus-visible) .mf-dot { outline: 3px solid rgba(212, 167, 44, .6); outline-offset: 3px; }
.mf-scale .mf-choice-text { font-size: 13px; line-height: 1.25; white-space: nowrap; color: var(--mf-dim); }
.mf-scale .mf-choice:has(input:checked) .mf-choice-text { color: var(--mf-ink); font-weight: 600; }
.mf-scale[aria-invalid=true] .mf-dot { border-color: var(--mf-red); }

/* Narrow: a vertical list of full-width rows */
@media (max-width: 639px) {
  .mf-scale { display: flex; flex-direction: column; border: 1px solid var(--mf-hairline); border-radius: 4px; overflow: hidden; }
  .mf-scale::before { display: none; }
  .mf-scale .mf-choice { flex-direction: row; align-items: center; gap: 14px; min-height: 48px; padding: 10px 14px; border-top: 1px solid var(--mf-hairline); }
  .mf-scale .mf-choice:first-child { border-top: none; }
  .mf-scale .mf-choice:has(input:checked) { background: var(--mf-selected-row); }
  .mf-scale .mf-dot { flex: none; width: 22px; height: 22px; }
  .mf-scale .mf-choice-text { font-size: 15px; white-space: normal; }
  .mf-fact + .mf-fact { border-left: none; border-top: 1px solid var(--mf-on-green-line); }
}

/* Name-or-number suggestions: in the page flow, never a floating layer (an overlay near the
   bottom of an embedded iframe gets clipped; in-flow content grows the frame instead). */
.mf-suggest { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--mf-line); border-radius: 3px; background: #ffffff; max-height: 340px; overflow-y: auto; }
.mf-suggest-opt { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 8px 10px; border-radius: 3px; cursor: pointer; min-height: 44px; }
.mf-suggest-opt:hover, .mf-suggest-opt[aria-selected=true] { background: var(--mf-selected-row); box-shadow: inset 0 0 0 1.5px var(--mf-gold-ink); }
.mf-suggest-name { font-weight: 600; }
.mf-suggest-meta { grid-column: 1; font: 12px var(--mf-mono); color: var(--mf-faint); }
.mf-suggest-flag { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 11px var(--mf-mono); color: var(--mf-gold-ink); background: var(--mf-selected-row); border: 1px solid var(--mf-gold); border-radius: 3px; padding: 2px 8px; }
.mf-suggest-other { border-top: 1px solid var(--mf-hairline); border-radius: 0; margin-top: 2px; }
.mf-suggest-other .mf-suggest-name { font-weight: 500; color: var(--mf-dim); }
.mf-suggest-empty { padding: 8px 10px; color: var(--mf-faint); font-size: 14px; }

/* Lookup results — guidance, not errors */
.mf-note { font-size: 14px; }
.mf-note:empty { display: none; }
.mf-note strong { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.mf-note span { color: var(--mf-faint); margin-left: 6px; }
.mf-note span::before { content: '· '; }
.mf-note-ok strong::before { content: ''; width: 14px; height: 14px; background: var(--mf-icon-check) center / contain no-repeat; }
.mf-note-warn strong::before { content: ''; width: 13px; height: 13px; background: var(--mf-icon-amber) center / contain no-repeat; }
.mf-note-warn span { display: block; margin: 2px 0 0 21px; color: var(--mf-gold-ink); }
.mf-note-warn span::before, .mf-note-typed span::before { content: ''; }
.mf-note-typed strong { color: var(--mf-dim); }
.mf-note-pending { font: 12px var(--mf-mono); color: var(--mf-faint); }

/* Errors: red triangle + text */
.mf-field-error { margin: 0; font-size: 13px; color: var(--mf-red); display: flex; gap: 6px; align-items: center; }
.mf-field-error::before { content: ''; width: 12px; height: 12px; flex: none; background: var(--mf-icon-warn) center / contain no-repeat; }
.mf-field-error:empty { display: none; }
.mf-error { margin: 0 0 16px; padding: 10px 12px; border-radius: 3px; background: #fbeae6; color: var(--mf-red); }

/* Submit area */
.mf-actions { border-top: 1px solid var(--mf-hairline); padding-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.mf-turnstile:empty { display: none; }
.mf-submit-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.mf-submit { height: 52px; padding: 0 28px; border: none; border-radius: 3px; background: var(--mf-brand); color: var(--mf-on-green); font: 600 15.5px var(--mf-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.mf-submit:hover { background: var(--mf-brand-hover); }
.mf-submit:focus-visible { outline: 3px solid var(--mf-gold); outline-offset: 2px; }
.mf-submit:disabled { opacity: .65; cursor: progress; }
.mf-arrow { width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%23d4a72c' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M2 7h10M8 3l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat; }
.mf-status { font: 12px var(--mf-mono); color: var(--mf-faint); }
.mf-status-ready { color: var(--mf-green); }
.mf-status-error { color: var(--mf-red); }

/* Confirmation */
/* A focused panel, not a page-wide box: the text uses the panel's full width, so it never stops
   halfway across (Van, 2026-10-22). */
.mf-success { max-width: 680px; margin: 24px auto 0; background: #ffffff; border: 1px solid var(--mf-hairline); border-top: 4px solid var(--mf-green); border-radius: 6px; padding: 40px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; box-shadow: 0 1px 2px rgba(18, 26, 22, .04); }
.mf-success .mf-dry { max-width: none; }
.mf-success-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--mf-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center no-repeat; }
.mf-success-title { font: 600 30px/1.2 var(--mf-serif); margin: 0; }
.mf-success-text { margin: 0; color: var(--mf-dim); font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.mf-success-text + .mf-success-text { margin-top: -6px; }
.mf-success-facts { display: grid; grid-template-columns: 1fr auto; gap: 12px 32px; padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--mf-hairline); width: 100%; }
.mf-success-fact { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
@media (max-width: 480px) { .mf-success-facts { grid-template-columns: 1fr; } }
.mf-success-fact .mf-eyebrow { color: var(--mf-faint); font-size: 10.5px; letter-spacing: .09em; }
.mf-success-fact .mf-mono { font-size: 15px; word-break: break-all; }
.mf-link { margin-top: 8px; background: none; border: none; padding: 0; font: 14px var(--mf-sans); color: var(--mf-gold-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.mf-dry { width: 100%; background: #f6f4ee; border: 1px solid var(--mf-hairline); border-radius: 4px; padding: 12px; overflow-x: auto; font: 12px/1.5 var(--mf-mono); }

/* Plain checkbox (other forms) */
.mf-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 500; }
.mf-check input { width: 20px; height: 20px; accent-color: var(--mf-brand); }

@media (max-width: 480px) {
  .mf-wrap { padding: 24px 16px 64px; }
  .mf-submit { width: 100%; justify-content: center; }
  .mf-success { padding: 32px 22px; }
}

/* The fee picker (Pay Fees): credential tiles, then that credential's fees in groups with prices.
   Design: Claude Design, 2026-10-26 ("Pick the credential, then the fee"). */
.mf-picker { display: flex; flex-direction: column; gap: 20px; }
.mf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mf-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 96px; padding: 18px 22px; background: #ffffff; border: 1.5px solid var(--mf-line); border-radius: 6px; cursor: pointer; text-align: left; font: inherit; color: var(--mf-ink); }
.mf-tile:hover { border-color: var(--mf-gold-ink); }
.mf-tile[aria-pressed=true] { border-color: var(--mf-ink); box-shadow: inset 0 0 0 1px var(--mf-ink); }
.mf-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(212, 167, 44, .45); }
.mf-tile-title { font-weight: 600; font-size: 18px; }
.mf-tile-text { font-size: 15px; color: var(--mf-dim); text-wrap: pretty; }
.mf-picker-q { margin-top: 8px; }
.mf-feelist { border: 1px solid var(--mf-hairline); border-radius: 6px; overflow: hidden; background: #ffffff; }
.mf-feegroup { font: 12px var(--mf-mono); letter-spacing: .1em; color: var(--mf-dim); background: #f6f4ee; padding: 14px 28px; border-top: 1px solid var(--mf-hairline); }
.mf-feetile > .mf-feegroup:first-child { border-top: none; }
.mf-feerow { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 22px; padding: 18px 28px; border-top: 1px solid var(--mf-hairline); cursor: pointer; }
.mf-feerow:hover { background: #fbfaf6; }
.mf-feerow:has(input:checked) { background: var(--mf-selected-row); }
.mf-feerow input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.mf-feerow .mf-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--mf-dot); background: #ffffff; }
.mf-feerow:has(input:checked) .mf-dot { border: 2px solid var(--mf-brand); background: var(--mf-gold); box-shadow: inset 0 0 0 3px #ffffff; }
.mf-feerow:has(input:focus-visible) .mf-dot { box-shadow: inset 0 0 0 3px #ffffff, 0 0 0 3px rgba(212, 167, 44, .45); }
.mf-feerow-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mf-feerow-title { font-weight: 600; font-size: 17px; }
.mf-feerow-sub { font: 13px var(--mf-mono); color: var(--mf-dim); }
.mf-feerow-price { font: 500 18px var(--mf-serif); white-space: nowrap; }
.mf-feerow-price:empty::before { content: '—'; color: var(--mf-dot); }
.mf-feeempty { margin: 0; padding: 18px 28px; color: var(--mf-dim); font-size: 15px; }
.mf-picker[aria-invalid=true] .mf-tile, .mf-picker[aria-invalid=true] .mf-feelist { border-color: var(--mf-red); }
@media (max-width: 639px) {
  .mf-tiles { grid-template-columns: 1fr; }
  .mf-tile { min-height: 0; padding: 14px 16px; }
  .mf-feegroup { padding: 10px 16px; }
  .mf-feerow { padding: 14px 16px; gap: 0 14px; }
}

/* ---- several-of (checkboxes) and file fields ---- */
.mf-multi { flex-direction: column; gap: 6px; }
.mf-multi .mf-choice { align-items: flex-start; min-height: 0; padding: 6px 0; }
.mf-multi .mf-choice input { flex: none; margin-top: 2px; }
.mf-file { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed var(--mf-line); border-radius: 8px; background: #fbfaf6; }
.mf-file input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.mf-file-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--mf-brand); border-radius: 6px; background: #ffffff; color: var(--mf-brand); font-weight: 600; cursor: pointer; }
.mf-file-btn:hover { background: var(--mf-brand); color: #ffffff; }
.mf-file input:focus-visible + .mf-file-btn { outline: 3px solid rgba(212, 167, 44, .6); outline-offset: 2px; }
.mf-file-state { font-size: 14px; line-height: 1.4; color: var(--mf-dim); word-break: break-word; }
.mf-file[data-state=done] { border-style: solid; border-color: var(--mf-brand); background: #ffffff; }
.mf-file[data-state=done] .mf-file-state { color: var(--mf-ink); }
.mf-file[data-state=done] .mf-file-btn { border-color: var(--mf-line); color: var(--mf-dim); }
.mf-file[data-state=busy] .mf-file-btn { opacity: .6; pointer-events: none; }
.mf-file[data-state=error] { border-color: var(--mf-red); }
.mf-file[data-state=error] .mf-file-state { color: var(--mf-red); }
