/* The Customer forms and pages (/me), shared with the owner's form preview in /app (ticket 13), so the preview shows what Customers see.
   Every rule sits under .cform: me.html's <body> and the owner app's preview wrapper. */
.cform { --line: #E4E7EC; --line-strong: #D0D5DD; --surface-2: #F9FAFB; --fg: #101828; --fg-2: #344054; --muted: #475467; --faint: #667085;
    --accent: #1F3FD1; --accent-hover: #1833B0; --good: #067647; --good-soft: #DCFAE6; --warn: #B54708; --warn-soft: #FFFAEB; --bad: #B42318; --bad-soft: #FEF3F2; }
.cform a { color: var(--accent); }
.cform a:focus-visible, .cform button:focus-visible, .cform input:focus-visible, .cform textarea:focus-visible, .cform select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cform h1 { font-size: 22px; margin: 0 0 6px; }
.cform h2 { font-size: 16px; margin: 0; }
.cform .lead { color: var(--muted); margin: 0 0 20px; }
.cform .card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.cform .card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cform .card-head h2 { margin-right: auto; }
.cform .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: #FFFFFF; color: var(--fg-2); border-radius: 10px;
    padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; min-height: 38px; box-sizing: border-box; cursor: pointer; text-decoration: none; }
.cform .btn:hover { background: var(--surface-2); }
.cform .btn:disabled { opacity: .55; cursor: not-allowed; }
.cform .btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.cform .btn.primary:hover { background: var(--accent-hover); }
.cform .btn.wide { width: 100%; }
.cform .btn.google { gap: 10px; min-height: 44px; font-size: 14px; }
.cform .btn.link { border: 0; background: none; padding: 4px 0; min-height: 0; color: var(--accent); }
.cform .btn.link.danger { color: var(--bad); }
@media (pointer: coarse) { .cform .btn:not(.link) { min-height: 44px; } }
.cform label { display: block; font-weight: 600; font-size: 13px; color: var(--fg-2); margin: 14px 0 6px; }
.cform input, .cform textarea, .cform select { width: 100%; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 16px; background: #FFFFFF; color: var(--fg); }
.cform textarea { min-height: 72px; resize: vertical; }
.cform input[type=radio], .cform input[type=checkbox] { width: auto; }
.cform .hint { color: var(--faint); font-size: 12px; margin: 4px 0 0; }
.cform .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.cform .or { text-align: center; color: var(--faint); margin: 16px 0; font-size: 12px; }
.cform .msg { border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; }
.cform .msg.bad { background: var(--bad-soft); color: var(--bad); }
.cform .msg.good { background: var(--good-soft); color: var(--good); }
.cform .note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; }
.cform .note p { margin: 6px 0; }
.cform .item { border-top: 1px solid var(--line); padding: 12px 0; }
.cform .item:first-of-type { border-top: 0; padding-top: 0; }
.cform .item-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cform .item-head strong { margin-right: auto; }
.cform .muted { color: var(--muted); }
.cform .tag { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 8px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.cform .tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.cform .empty { color: var(--muted); margin: 0; }
.cform [hidden] { display: none !important; }
/* The Customer forms (ticket 12): one column, 44px touch targets, a sticky bar with the running summary and Send. */
.cform .form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cform .form .group { margin: 24px 0; }
.cform .form .group:first-child { margin-top: 0; }
.cform .form legend { font-weight: 700; font-size: 15px; color: var(--fg); padding: 0; margin-bottom: 8px; }
.cform .form .field legend { font-weight: 600; font-size: 13px; color: var(--fg-2); margin: 14px 0 6px; }
.cform .err { color: var(--bad); font-size: 12px; margin: 4px 0 0; }
.cform [aria-invalid="true"] { border-color: var(--bad); }
.cform .chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.cform .chip { flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 4px 14px; box-sizing: border-box;
    border: 1px solid var(--line-strong); border-radius: 999px; background: #FFFFFF; color: var(--fg-2); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; }
.cform .chip:hover { background: var(--surface-2); }
.cform .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.cform .chip:disabled { color: var(--faint); background: var(--surface-2); cursor: not-allowed; }
.cform .chip small { font-size: 11px; font-weight: 500; }
.cform .find { margin-bottom: 8px; }
.cform .cat { scroll-margin-top: 16px; }
.cform .cat h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 16px 0 0; }
.cform .line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.cform .cat h3 + .line, .cform .cat:first-of-type .line:first-child { border-top: 0; }
.cform .line label { margin: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; color: var(--fg); }
.cform .line label .muted { font-weight: 400; font-size: 13px; }
.cform .stepper { flex: none; display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.cform .step { width: 44px; height: 44px; border: 0; background: #FFFFFF; color: var(--accent); font: inherit; font-size: 20px; font-weight: 600; cursor: pointer; }
.cform .step:hover { background: var(--surface-2); }
.cform .stepper input { width: 40px; height: 44px; border: 0; border-radius: 0; padding: 0; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.cform .stepper input::-webkit-inner-spin-button, .cform .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cform .seg { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.cform .seg label, .cform .opt { position: relative; flex: 1; margin: 0; font-weight: 600; }
.cform .seg input, .cform .opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cform .seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 9px; color: var(--fg-2); }
.cform .seg input:checked + span { background: #FFFFFF; color: var(--accent); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.cform .opts { display: grid; gap: 8px; }
.cform .opt > span { display: flex; flex-direction: column; justify-content: center; min-height: 44px; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--fg); }
.cform .opt .muted { font-weight: 400; font-size: 13px; }
.cform .opt input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #F5F7FF; }
.cform .seg input:focus-visible + span, .cform .opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cform .form details summary { padding: 12px 0; cursor: pointer; color: var(--accent); font-weight: 600; }
.cform .bar { position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 12px; margin: 16px -20px -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: #FFFFFF; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.cform .bar [data-sum] { flex: 1; min-width: 0; font-weight: 600; }
.cform .bar .btn { min-height: 44px; padding: 0 20px; font-size: 14px; }
/* The owner's multiple choice (ticket 13): a box per option, each a 44px row. */
.cform .checks { display: grid; gap: 2px; }
.cform .checks label { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 14px; font-weight: 500; color: var(--fg); cursor: pointer; }
.cform .checks input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
/* The owner's preview in /app: the same form, drawn smaller, with nothing that sticks or can be used. */
.cform.cpreview { border: 0; padding: 0; margin: 0; min-width: 0; font: 14px/1.5 Inter, system-ui, sans-serif; color: var(--fg); }
.cform.cpreview h1 { font-size: 18px; }
.cform.cpreview .bar { position: static; }
