.custom-plan { color: var(--saas-ink); background: var(--saas-soft); scroll-margin-top: 24px; }
.custom-plan [hidden] { display: none !important; }
.custom-plan * { box-sizing: border-box; }
.custom-plan-header { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.custom-plan-header p { max-width: 68ch; margin-bottom: 0; }
.custom-plan-header > a { flex-shrink: 0; padding-block: 8px; font-size: 14px; }
.custom-plan h2 { margin: 0 0 12px; }
.custom-plan h3 { margin: 28px 0 12px; font-size: 20px; }
.custom-plan h4 { margin: 0; padding: 16px 0 8px; font-size: 16px; }
.custom-plan p, .custom-plan small { line-height: 1.6; }
.custom-plan a { color: var(--saas-primary); text-underline-offset: 3px; }
.custom-plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 340px); gap: 32px; align-items: start; }
.custom-plan-options { min-width: 0; }
.custom-plan-platform { padding-bottom: 12px; border-bottom: 1px solid var(--saas-line); }
.custom-plan-platform h3 { margin-top: 0; }
.custom-plan-platform p { margin: 0 0 12px; }
.custom-plan-muted, .custom-plan small { color: var(--saas-muted); }
.custom-plan label { display: block; font-size: 14px; line-height: 1.5; font-weight: 600; margin-bottom: 8px; }
/* Keep the app-wide compact-label rule from shrinking this public form. */
#custom-plan-form label { font-size: 14px; color: var(--saas-ink); }
.custom-plan input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .custom-plan textarea, .custom-plan select {
    width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--saas-muted);
    border-radius: 7px; color: var(--saas-ink); background: var(--saas-surface); font: inherit; font-size: 16px; caret-color: var(--saas-primary);
}
.custom-plan textarea { resize: vertical; }
.custom-plan-select { position: relative; }
.custom-plan .custom-plan-select select { appearance: none; -webkit-appearance: none; padding-inline-end: 44px; background-image: none; }
.custom-plan-select > svg { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--saas-ink); }
.custom-plan-select:has(select:disabled) > svg { color: var(--saas-muted); }
.custom-plan input::placeholder, .custom-plan textarea::placeholder { color: var(--saas-muted); opacity: 1; }
.custom-plan input[type=checkbox], .custom-plan input[type=radio] { width: 19px; height: 19px; flex: 0 0 19px; margin: 0; accent-color: var(--saas-primary); }
.custom-plan :is(input, textarea, select, button, a, summary, [data-custom-scroll]):focus-visible { outline: 3px solid var(--saas-primary); outline-offset: 3px; }
.custom-plan ::selection { background: var(--saas-primary); color: var(--saas-surface); }
.custom-plan-cycle { border: 0; padding: 0; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.custom-plan-cycle legend { width: 100%; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.custom-plan-cycle label, .custom-plan-selected, .custom-plan-consent { display: flex !important; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.custom-plan-cycle label { margin: 0; padding: 10px 16px; border: 1px solid var(--saas-line); border-radius: 7px; background: var(--saas-surface); }
.custom-plan-cycle label:has(input:checked) { border-color: var(--saas-primary); background: color-mix(in srgb, var(--saas-primary) 6%, var(--saas-surface)); }
.custom-plan-cycle label:has(input:focus-visible) { outline: 3px solid var(--saas-primary); outline-offset: 3px; }
.custom-plan-cycle span { color: var(--saas-muted); font-size: 14px; font-weight: 400; }
.custom-plan-capacity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.custom-plan-capacity small { display: block; margin-top: 8px; }
.custom-plan-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 20px; margin-top: 20px; }
.custom-plan-search > label:first-child { grid-column: 1 / -1; margin: 0; }
.custom-plan-search .custom-plan-selected { margin: 0; }
#custom-module-count { margin: 12px 0 4px; font-size: 14px; }
.custom-plan-selected { font-size: 14px; font-weight: 400 !important; }
.custom-plan-module-list { max-height: 600px; overflow-y: auto; padding-inline: 4px 12px; scrollbar-color: var(--saas-muted) var(--saas-soft); scrollbar-width: thin; }
.custom-plan-module-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.custom-plan-module-group h4 { grid-column: 1 / -1; padding: 20px 0 0; margin-bottom: 0; }
.custom-plan-module { margin: 0; border: 1px solid var(--saas-line); border-radius: 12px; background: var(--saas-surface); }
.custom-plan-module .custom-plan-module-choice { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 88px; padding: 14px; margin: 0; cursor: pointer; }
.custom-plan input.custom-plan-module-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.custom-plan-module-info { display: grid; gap: 6px; min-width: 0; }
.custom-plan-module-name { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.custom-plan-module strong { font-size: 14px; line-height: 1.5; font-weight: 400; color: var(--saas-muted); font-variant-numeric: tabular-nums; }
.custom-plan-module-state { min-width: 76px; min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 10px; border: 1px solid var(--saas-line); border-radius: 7px; font-size: 14px; color: var(--saas-primary); }
.custom-plan-module-state > span { display: inline-flex; align-items: center; gap: 6px; }
.custom-plan-module-state .custom-plan-module-added { display: none; }
.custom-plan-module-input:checked ~ .custom-plan-module-state .custom-plan-module-add { display: none; }
.custom-plan-module-input:checked ~ .custom-plan-module-state .custom-plan-module-added { display: inline-flex; }
.custom-plan-module:has(input:checked) { border-color: var(--saas-primary); background: color-mix(in srgb, var(--saas-primary) 6%, var(--saas-surface)); }
.custom-plan-module-input:checked ~ .custom-plan-module-state { border-color: var(--saas-primary); background: var(--saas-primary); color: #fff; }
.custom-plan-module:has(input:focus-visible) { outline: 3px solid var(--saas-primary); outline-offset: 3px; }
.custom-plan-module:has(input:disabled) .custom-plan-module-choice { cursor: default; }
.custom-plan-module:has(input:disabled) .custom-plan-module-state { opacity: .7; }
@media (hover: hover) {
    .custom-plan-module:has(input:not(:disabled)):hover { border-color: var(--saas-primary); }
}
.custom-plan-module .custom-plan-module-description { margin: 0 16px 12px; font-size: 14px; color: var(--saas-muted); overflow-wrap: anywhere; }
.custom-plan-module-details ul { padding-inline-start: 20px; margin: 0 0 12px; font-size: 14px; line-height: 1.6; }
.custom-plan-module-details li + li { margin-top: 4px; }
.custom-plan-module-details p { overflow-wrap: anywhere; }
.custom-plan-included-details summary { min-height: 44px; padding-block: 10px; color: var(--saas-primary); cursor: pointer; }
.custom-plan-included-details dl { margin: 8px 0 16px; font-size: 14px; line-height: 1.6; }
.custom-plan-included-details dt { font-weight: 600; }
.custom-plan-included-details dd { margin: 4px 0 14px; }
.custom-plan-module details { margin-inline: 16px; border-top: 1px solid var(--saas-line); }
.custom-plan-module summary { min-height: 44px; padding-block: 12px; color: var(--saas-primary); cursor: pointer; font-size: 14px; }
.custom-plan-module details p { margin: 0 0 16px; font-size: 14px; }
.custom-plan-summary { position: sticky; top: 24px; padding: 24px; background: var(--saas-surface); border: 1px solid var(--saas-line); border-radius: 12px; }
.custom-plan-summary h3 { margin: 0 0 12px; }
.custom-plan-summary .custom-plan-action { width: 100%; }
#custom-capacity-summary { color: var(--saas-muted); padding-bottom: 20px; margin-bottom: 0; border-bottom: 1px solid var(--saas-line); }
.custom-plan-summary p { font-size: 14px; }
.custom-plan-total { display: flex; flex-direction: column; gap: 6px; margin: 24px 0; font-variant-numeric: tabular-nums; }
.custom-plan-total strong { font-size: 30px; line-height: 1.2; overflow-wrap: anywhere; }
.custom-plan-total span { color: var(--saas-muted); font-size: 14px; }
#custom-breakdown { list-style: none; margin: 0 0 20px; padding: 0; max-height: 240px; overflow-y: auto; scrollbar-color: var(--saas-muted) var(--saas-surface); }
#custom-breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--saas-line); font-size: 14px; }
#custom-breakdown li span { overflow-wrap: anywhere; }
#custom-breakdown strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.custom-plan .custom-plan-action { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 12px 18px; background: var(--saas-primary); border: 1px solid transparent; color: #fff; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.custom-plan .custom-plan-action:hover { background: var(--saas-primary-dark); color: #fff; }
.custom-plan .custom-plan-action:disabled { cursor: not-allowed; background: var(--saas-line); color: var(--saas-muted); opacity: 1; }
.custom-plan [aria-busy="true"] .custom-plan-action:disabled { cursor: wait; }
.custom-plan-contact { border-top: 1px solid var(--saas-line); margin-top: 40px; padding-top: 8px; scroll-margin-top: 24px; }
.custom-plan-contact > p { max-width: 72ch; }
.custom-plan-consent input { align-self: flex-start; margin-top: 3px !important; }
.custom-plan-contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.custom-plan-contact-fields small { display: block; margin-top: 8px; }
.custom-plan-location-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.custom-plan-location-fields small { display: block; margin-top: 8px; }
.custom-plan select:disabled { opacity: 1; color: var(--saas-muted); background: var(--saas-soft); cursor: default; }
.custom-plan-location-retry { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--saas-primary); font: inherit; text-decoration: underline; cursor: pointer; }
.custom-plan-consent { font-weight: 400 !important; margin: 18px 0 !important; }
#custom-request-result { padding: 16px; border: 1px solid var(--saas-muted); border-radius: 7px; margin-bottom: 20px; background: var(--saas-surface); }
.custom-plan-trap, .custom-plan-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body[data-color="1E202D"] .custom-plan input, body[data-color="1E202D"] .custom-plan textarea, body[data-color="1E202D"] .custom-plan select { color-scheme: dark; }
body[data-color="1E202D"] .custom-plan .custom-plan-action { background: #4856bd; color: #fff; }
body[data-color="1E202D"] .custom-plan .custom-plan-action:hover { background: #384499; }
body[data-color="1E202D"] .custom-plan .custom-plan-action:disabled { background: var(--saas-line); color: var(--saas-muted); }
body[data-color="1E202D"] .custom-plan-module-input:checked ~ .custom-plan-module-state { background: #4856bd; border-color: #4856bd; color: #fff; }
@media (min-width: 901px) and (max-width: 1150px) {
    .custom-plan-module-group { grid-template-columns: minmax(0, 1fr); }
    .custom-plan-header > a { flex-shrink: 1; max-width: 240px; }
}
@media (max-width: 900px) {
    .custom-plan-header { display: block; }
    .custom-plan-grid { grid-template-columns: minmax(0, 1fr); }
    .custom-plan-summary { position: static; }
    .custom-plan-contact-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
    .custom-plan-capacity, .custom-plan-module-group, .custom-plan-search { grid-template-columns: minmax(0, 1fr); }
    .custom-plan-header > a { display: inline-block; margin-top: 12px; }
    .custom-plan-cycle label { flex: 1 1 auto; justify-content: center; padding-inline: 12px; }
    .custom-plan-module .custom-plan-module-choice { padding: 12px; gap: 12px; }
    .custom-plan-module-state { min-width: 80px; padding-inline: 10px; }
    .custom-plan-module details { margin-inline: 12px; }
    .custom-plan-summary { padding: 20px; }
}

/* A separately purchasable feature is free while its parent is selected. */
.custom-plan .custom-plan-module[data-bundle-covered="true"] .custom-plan-module-state .custom-plan-module-add,
.custom-plan .custom-plan-module[data-bundle-covered="true"] .custom-plan-module-state .custom-plan-module-added { display: none; }
.custom-plan-bundle-description { margin: 0; padding: 0 14px 16px; font-size: 14px; color: var(--saas-muted); }
