/* CV Engage: forms and the CV Hub. Uses the theme's colours and fonts when present. */
.cvm-form, .cvm-bot { --cvm-brand: var(--brand, #d71920); --cvm-brand-dark: var(--brand-dark, #a81319); --cvm-ink: #15171a; --cvm-line: #dfdbd2; --cvm-muted: #6e7278; --cvm-soft: #f5f2ec; --cvm-serif: var(--serif, Georgia, serif); --cvm-r: 3px; font-family: inherit; }
.cvm-form .screen-reader-text, .cvm-bot .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cvm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cvm-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cvm-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; min-width: 0; font-size: 13px; font-weight: 600; color: inherit; }
.cvm-field-email { flex: 2 1 220px; }
.cvm-form input[type="text"], .cvm-form input[type="email"], .cvm-form input[type="tel"], .cvm-form select, .cvm-form textarea {
	width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--cvm-line); border-radius: var(--cvm-r); font: inherit; font-size: 16px; font-weight: 400;
	color: var(--cvm-ink); background: #fff;
}
.cvm-form textarea { resize: vertical; min-height: 96px; }
.cvm-form input:focus, .cvm-form select:focus, .cvm-form textarea:focus { outline: 2px solid var(--cvm-brand); outline-offset: -1px; border-color: var(--cvm-brand); }
.cvm-btn { min-height: 46px; border: 0; border-radius: var(--cvm-r); padding: 10px 22px; background: var(--cvm-brand); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; }
.cvm-btn:hover { background: var(--cvm-brand-dark); }
.cvm-btn[disabled] { opacity: .6; cursor: wait; }
.cvm-btn-block { width: 100%; }
.cvm-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cvm-enquiry { display: grid; gap: 10px; }

.cvm-interests { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cvm-interests legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.cvm-chip { position: relative; cursor: pointer; }
.cvm-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.cvm-chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: var(--cvm-r); font-size: 13px; font-weight: 500; border: 1px solid var(--cvm-line); background: #fff; color: var(--cvm-ink); }
.cvm-chip input:checked + span { background: var(--cvm-ink); color: #fff; border-color: var(--cvm-ink); }
.cvm-chip input:focus-visible + span { outline: 2px solid var(--cvm-brand); outline-offset: 2px; }
.cvm-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13px; line-height: 1.45; cursor: pointer; }
.cvm-consent input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--cvm-brand); }
.cvm-consent a { text-decoration: underline; color: inherit; }
.cvm-status { margin: 8px 0 0; font-size: 14px; font-weight: 600; min-height: 1em; }
.cvm-status:empty { display: none; }
.cvm-status.is-ok { color: #15803d; }
.cvm-status.is-err { color: #b91c1c; }
.cvm-form.is-done .cvm-row, .cvm-form.is-done .cvm-details, .cvm-form.is-done .cvm-interests, .cvm-form.is-done .cvm-consent, .cvm-form.is-done .cvm-submit, .cvm-enquiry.is-done > label, .cvm-enquiry.is-done > .cvm-grid2, .cvm-enquiry.is-done > button { display: none; }

/* Footer: the full details form, on a white card */
.cvm-ctx-footer { background: #fff; color: var(--cvm-ink); padding: clamp(18px, 2.4vw, 28px); }
.cvm-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.cvm-details .cvm-field > span { color: var(--cvm-ink); }
.cvm-submit { margin-top: 14px; width: 100%; }

/* CV Hub -------------------------------------------------------------------- */
.cvm-bot { position: fixed; bottom: 22px; z-index: 950; color: var(--cvm-ink); font-size: 15px; line-height: 1.45; }
.cvm-bot-right { right: 22px; }
.cvm-bot-left { left: 22px; }
body.drawer-open .cvm-bot { display: none; }
.cvm-bot-launch { display: flex; align-items: center; height: 50px; padding: 0 18px 0 15px; border-radius: 25px; border: 0; cursor: pointer; color: #fff; background: var(--cvm-ink); box-shadow: 0 8px 26px rgba(20, 18, 14, .32); }
.cvm-bot-launch:hover { background: var(--cvm-brand); }
.cvm-bot-launch-icon { display: flex; align-items: center; gap: 9px; }
.cvm-launch-label { font-size: 14px; font-weight: 700; }
.cvm-bot.is-open .cvm-bot-launch { display: none; }

.cvm-bot-panel { position: absolute; bottom: 0; width: 400px; max-width: calc(100vw - 32px); height: min(640px, calc(100vh - 60px)); background: #fff; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(14, 14, 16, .3); border-radius: 6px; }
.cvm-bot-panel[hidden] { display: none; }
.cvm-bot-right .cvm-bot-panel { right: 0; }
.cvm-bot-left .cvm-bot-panel { left: 0; }
.cvm-bot-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-bottom: 3px solid var(--cvm-brand); }
.cvm-bot-head strong { display: block; font-family: var(--cvm-serif); font-size: 19px; line-height: 1.15; }
.cvm-bot-head span span, .cvm-bot-head div > span { display: block; font-size: 12.5px; color: var(--cvm-muted); }
.cvm-bot-avatar { flex: none; width: 38px; height: 38px; }
.cvm-bot-avatar img { width: 38px; height: 38px; object-fit: contain; }
.cvm-bot-x { margin-left: auto; width: 44px; height: 44px; border: 0; background: none; color: var(--cvm-ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.cvm-bot-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px; }
.cvm-view-title { font-family: var(--cvm-serif); font-size: 22px; margin: 0 0 10px; }
.cvm-about { font-size: 14.5px; color: #3c4148; margin: 0 0 14px; }
.cvm-about a { color: var(--cvm-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.cvm-adcard { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px; background: var(--cvm-brand); color: #fff; text-decoration: none; }
.cvm-adcard:hover { background: var(--cvm-brand-dark); color: #fff; }
.cvm-adcard svg { flex: none; width: 26px; height: 26px; }
.cvm-adcard strong { display: block; font-family: var(--cvm-serif); font-size: 18px; line-height: 1.2; }
.cvm-adcard em { font-style: normal; font-size: 13px; line-height: 1.35; display: block; opacity: .93; }

.cvm-quick { display: flex; flex-direction: column; }
.cvm-quick button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 2px; text-align: left; border: 0; border-bottom: 1px solid var(--cvm-line); background: none; color: var(--cvm-ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.cvm-quick button:hover { color: var(--cvm-brand); }
.cvm-quick svg { color: var(--cvm-brand); flex: none; }

.cvm-pubs { display: grid; gap: 8px; margin-bottom: 12px; }
.cvm-pub { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--cvm-line); color: var(--cvm-ink); text-decoration: none; }
.cvm-pub:hover { border-color: var(--cvm-ink); color: var(--cvm-ink); }
.cvm-pub-plain { padding: 12px 14px; }
.cvm-pub-img { flex: none; width: 66px; height: 50px; display: grid; place-items: center; background: var(--cvm-soft); overflow: hidden; }
.cvm-pub-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.cvm-pub-img b { font-family: var(--cvm-serif); font-size: 22px; color: var(--cvm-brand); }
.cvm-pub-text { min-width: 0; }
.cvm-pub-text strong { display: block; font-family: var(--cvm-serif); font-size: 16.5px; line-height: 1.2; }
.cvm-pub-text em { display: block; font-style: normal; font-size: 13px; color: var(--cvm-muted); line-height: 1.3; }

.cvm-story { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--cvm-line); color: var(--cvm-ink); text-decoration: none; }
.cvm-story:first-child { padding-top: 0; }
.cvm-story:hover strong { color: var(--cvm-brand); }
.cvm-story-img { display: block; width: 76px; height: 58px; background: var(--cvm-soft); overflow: hidden; }
.cvm-story-img img { width: 100%; height: 100%; object-fit: cover; }
.cvm-story-text strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--cvm-serif); font-size: 15.5px; line-height: 1.25; font-weight: 600; }
.cvm-story-text time { display: block; font-size: 12px; color: var(--cvm-muted); margin-top: 3px; }
.cvm-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--cvm-brand); font-weight: 700; font-size: 14px; text-decoration: none; }
.cvm-more svg { width: 16px; height: 16px; }

.cvm-bot .cvm-row { flex-direction: column; }
.cvm-bot .cvm-field { flex: none; }
.cvm-bot .cvm-btn { width: 100%; }
.cvm-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--cvm-line); padding-bottom: env(safe-area-inset-bottom); }
.cvm-tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border: 0; background: none; color: var(--cvm-muted); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.cvm-tabs button[aria-current="true"] { color: var(--cvm-brand); }

.cvm-toast { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 9999; background: #15171a; color: #fff; padding: 14px 22px; font-weight: 600; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); width: max-content; max-width: calc(100vw - 32px); }
.cvm-toast[hidden] { display: none; }

@media (max-width: 760px) {
	.cvm-bot { bottom: calc(14px + env(safe-area-inset-bottom)); }
	.cvm-bot-right { right: 14px; }
	.cvm-bot-left { left: 14px; }
	.cvm-bot-launch { width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; }
	.cvm-launch-label { display: none; }
	.cvm-bot-panel { position: fixed; inset: auto 0 0 0; width: auto; max-width: none; height: 86vh; height: 86dvh; border-radius: 12px 12px 0 0; }
	.cvm-details { grid-template-columns: minmax(0, 1fr); }
	.cvm-ctx-footer { padding: 16px; }
}
@media (max-width: 380px) { .cvm-grid2 { grid-template-columns: minmax(0, 1fr); } }
