.bwd,
.bwd-modal {
	--bwd-navy: #0f2a5c;
	--bwd-ink: #1f2937;
	--bwd-muted: #6b7280;
	--bwd-line: #d9dee7;
	--bwd-bg: #fbfaf5;
	--bwd-gold: #f2a900;
	--bwd-danger: #b42318;
	font-family: inherit;
	color: var(--bwd-ink);
	box-sizing: border-box;
}
.bwd *, .bwd *::before, .bwd *::after,
.bwd-modal *, .bwd-modal *::before, .bwd-modal *::after { box-sizing: border-box; }

.bwd .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Section ---------- */
.bwd { padding: 40px 16px; }
.bwd__head { text-align: center; margin-bottom: 28px; }
.bwd__title { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); font-weight: 700; color: var(--bwd-navy); line-height: 1.2; }
.bwd__sub { margin: 0; color: var(--bwd-muted); font-size: 15px; }

.bwd__grid {
	display: grid;
	grid-template-columns: repeat(var(--bwd-cols, 3), minmax(0, 1fr));
	gap: 24px;
	max-width: 1120px;
	margin: 0 auto;
}

/* ---------- Card ---------- */
.bwd-card {
	background: #fff;
	border: 1px solid var(--bwd-line);
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 14px rgba(15, 42, 92, .06);
}
.bwd-card__media { height: 150px; background: color-mix(in srgb, var(--bwd-c) 18%, #fff); }
.bwd-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bwd-card__body { padding: 0 20px 20px; display: flex; flex-direction: column; flex: 1; }
.bwd-card__icon {
	width: 46px; height: 46px; border-radius: 50%;
	background: var(--bwd-c); color: #fff;
	display: grid; place-items: center;
	margin: -23px 0 10px;
	border: 3px solid #fff;
}
.bwd-card__icon svg { width: 22px; height: 22px; fill: currentColor; }
.bwd-card__icon { color: var(--bwd-on, #fff); }
.bwd-card__icon--img { background: #fff; box-shadow: 0 0 0 2px var(--bwd-c); }
.bwd-card__icon--img img { width: 24px; height: 24px; object-fit: contain; display: block; }

.bwd-card__title { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--bwd-ink); }
.bwd-card__desc { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: #4b5563; flex: 1; }

.bwd-card__presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.bwd-chip {
	appearance: none; cursor: pointer;
	padding: 9px 4px; border-radius: 7px;
	background: #fff; color: var(--bwd-ink);
	border: 1.5px solid var(--bwd-line);
	font: inherit; font-size: 13px; font-weight: 600;
	transition: border-color .15s, background-color .15s, color .15s;
}
.bwd-chip:hover { border-color: var(--bwd-c); }
.bwd-chip[aria-pressed="true"] {
	border-color: var(--bwd-c);
	background: color-mix(in srgb, var(--bwd-c) 12%, #fff);
	color: var(--bwd-ink);
	box-shadow: inset 0 0 0 1px var(--bwd-c);
}

.bwd-custom { position: relative; display: block; margin-bottom: 14px; }
.bwd-custom__input {
	width: 100%; padding: 10px 40px 10px 12px;
	border: 1.5px solid var(--bwd-line); border-radius: 7px;
	font: inherit; font-size: 14px; background: #fff; color: var(--bwd-ink);
}
.bwd-custom__input.is-active { border-color: var(--bwd-c); box-shadow: inset 0 0 0 1px var(--bwd-c); }
.bwd-custom__unit {
	position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
	color: var(--bwd-muted); font-size: 13px; pointer-events: none;
}

.bwd-card__err { margin: -6px 0 10px; font-size: 13px; color: var(--bwd-danger); }

/* ---------- Buttons ---------- */
.bwd-btn {
	appearance: none; cursor: pointer; width: 100%;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 16px; border: 0; border-radius: 7px;
	background: var(--bwd-c, var(--bwd-navy)); color: var(--bwd-on, #fff);
	font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .02em;
	text-transform: uppercase;
	transition: filter .15s, transform .1s;
}
.bwd-btn:hover { filter: brightness(1.08); }
.bwd-btn:active { transform: translateY(1px); }
.bwd-btn svg { width: 16px; height: 16px; flex: none; }
.bwd-btn[disabled] { opacity: .6; cursor: progress; }

.bwd-btn:focus-visible, .bwd-chip:focus-visible,
.bwd-custom__input:focus-visible, .bwd-field input:focus-visible,
.bwd-modal__x:focus-visible {
	outline: 3px solid #2563eb; outline-offset: 2px;
}

/* ---------- Modal ---------- */
.bwd-modal { position: fixed; inset: 0; z-index: 999999; display: grid; place-items: center; padding: 16px; }
.bwd-modal[hidden] { display: none; }
.bwd-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 20, 48, .6); }
.bwd-modal__dialog {
	position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px);
	overflow-y: auto; background: #fff; border-radius: 14px; padding: 28px 24px 24px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	animation: bwd-pop .22s ease-out;
}
.bwd-modal__dialog:focus { outline: none; }
@keyframes bwd-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.bwd-modal__x {
	position: absolute; top: 10px; right: 12px; width: 36px; height: 36px;
	border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--bwd-muted);
}
.bwd-modal__title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--bwd-navy); }
.bwd-modal__summary {
	display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
	margin: 0 0 14px; padding: 10px 12px; border-radius: 8px;
	background: var(--bwd-bg); border: 1px solid var(--bwd-line); font-size: 14px;
}
.bwd-modal__summary strong { color: var(--bwd-navy); font-size: 16px; white-space: nowrap; }

.bwd-bank { margin-bottom: 16px; }
.bwd-bank__label { margin: 0 0 6px; font-size: 13px; color: var(--bwd-muted); }
.bwd-bank__info {
	margin: 0; padding: 10px 12px; border-radius: 8px;
	background: #f3f6fb; font: inherit; font-size: 13px; line-height: 1.6;
	white-space: pre-wrap; color: var(--bwd-ink);
}

.bwd-field { margin-bottom: 14px; }
.bwd-field label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 600; }
.bwd-field input[type="text"], .bwd-field input[type="email"], .bwd-field input[type="tel"] {
	width: 100%; padding: 10px 12px; border: 1.5px solid var(--bwd-line); border-radius: 7px;
	font: inherit; font-size: 15px; background: #fff; color: var(--bwd-ink);
}
.bwd-field input[type="file"] { width: 100%; font-size: 14px; }
.bwd-field.has-err input { border-color: var(--bwd-danger); }
.bwd-field__hint { margin: 4px 0 0; font-size: 12px; color: var(--bwd-muted); }
.bwd-field__err { margin: 4px 0 0; font-size: 13px; color: var(--bwd-danger); min-height: 0; }
.bwd-field__err:empty { display: none; }

.bwd-form__err { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #fef3f2; color: var(--bwd-danger); font-size: 14px; }
.bwd-form__err[hidden] { display: none; }
.bwd-btn--submit { background: var(--bwd-navy); }

.bwd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bwd-modal__done { text-align: center; padding: 12px 0 4px; }
.bwd-modal__done[hidden], .bwd-modal__form-wrap[hidden] { display: none; }
.bwd-modal__check {
	width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
	display: grid; place-items: center; background: #e7f4ec; color: #1f7a3f;
}
.bwd-modal__check svg { width: 28px; height: 28px; }
.bwd-modal__msg { margin: 0 0 18px; color: #4b5563; line-height: 1.55; }

body.bwd-lock { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.bwd__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
}
@media (max-width: 640px) {
	.bwd__grid { grid-template-columns: 1fr; max-width: 460px; }
}
@media (prefers-reduced-motion: reduce) {
	.bwd-modal__dialog { animation: none; }
	.bwd-btn, .bwd-chip { transition: none; }
}
