/* ModbusPilot website - custom build page (#/custom) and the custom-build highlights on other pages */
.cb-steps { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.cb-steps div { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; border: 1px solid var(--mk-line-2); background: var(--mk-card); font-size: 14px; }
.cb-steps b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--mk-a1), var(--mk-a2)); color: #fff; font-size: 13px; }

.cb-wrap { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 18px; align-items: start; padding-top: 32px; }
.cb-form { display: grid; gap: 16px; min-width: 0; }
.cb-panel h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; }
.cb-panel h3 small { font-weight: 400; font-size: 14px; color: var(--mk-muted); }
.cb-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--mk-card-2); border: 1px solid var(--mk-line-2); font-size: 14px; }

.cb-bases { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.cb-base { position: relative; cursor: pointer; }
.cb-base input { position: absolute; opacity: 0; pointer-events: none; }
.cb-base span { display: grid; gap: 3px; height: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--mk-line-2); background: var(--mk-card-2); transition: border-color 0.15s, box-shadow 0.15s; }
.cb-base small { color: var(--mk-muted); font-size: 13px; line-height: 1.35; }
.cb-base:hover span { border-color: color-mix(in srgb, var(--mk-a1) 55%, transparent); }
.cb-base input:checked + span { border-color: var(--mk-a1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-a1) 25%, transparent); }
.cb-base input:focus-visible + span { outline: 2px solid var(--mk-a1); outline-offset: 2px; }

.cb-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cb-chip { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--mk-line-2); background: var(--mk-card-2); color: var(--mk-fg); cursor: pointer; }
.cb-chip:hover { border-color: var(--mk-a1); }
.cb-groups { display: grid; gap: 14px; }
.cb-group { border: 1px solid var(--mk-line); border-radius: 12px; padding: 4px 12px 10px; margin: 0; min-width: 0; }
.cb-group legend { display: flex; align-items: center; gap: 12px; padding: 0 6px; font-weight: 700; font-size: 14px; }
.cb-link { font: inherit; font-size: 12.5px; font-weight: 500; border: 0; background: none; color: var(--mk-a1); cursor: pointer; padding: 0; }
.cb-link:hover { text-decoration: underline; }
.cb-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 12px; }

.cb-feature { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; transition: background 0.12s; }
.cb-options .cb-feature { grid-template-columns: 20px minmax(0, 1fr); }
.cb-feature:hover { background: var(--mk-card-2); }
.cb-feature.on { background: color-mix(in srgb, var(--mk-a1) 10%, transparent); }
.cb-feature.off { opacity: 0.45; cursor: not-allowed; }
.cb-feature input, .cb-inline input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--mk-a1); cursor: inherit; }
.cb-ftext { display: grid; gap: 2px; min-width: 0; }
.cb-ftext b { font-size: 14.5px; font-weight: 600; }
.cb-ftext small { color: var(--mk-muted); font-size: 13px; line-height: 1.4; }
.cb-ed { align-self: center; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--mk-line-2); color: var(--mk-muted); white-space: nowrap; }
.cb-ed-basic { color: #1c7ed6; border-color: color-mix(in srgb, #1c7ed6 45%, transparent); }
.cb-ed-advanced { color: #7048e8; border-color: color-mix(in srgb, #7048e8 45%, transparent); }
.cb-ed-pro { color: #d6336c; border-color: color-mix(in srgb, #d6336c 45%, transparent); }
.cb-ed-free { color: #2f9e44; border-color: color-mix(in srgb, #2f9e44 45%, transparent); }

.cb-row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
.cb-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 44px; font-weight: 400; }
.cb-inline { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cb-inline input { margin: 0; }

.cb-side { position: sticky; top: 76px; }
.cb-summary h3 { margin: 0 0 10px; }
.cb-sum-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--mk-muted); margin-bottom: 10px; }
.cb-count b { color: var(--mk-fg); font-size: 18px; }
.cb-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; max-height: 260px; overflow: auto; }
.cb-pill { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--mk-card-2); border: 1px solid var(--mk-line-2); }
.cb-pill.alt { border-style: dashed; }
.cb-cover { font-size: 13.5px; color: var(--mk-muted); line-height: 1.5; margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--mk-card-2); }
.cb-cover b { color: var(--mk-fg); }
.cb-send { width: 100%; justify-content: center; margin-top: 14px; }
.cb-send[disabled] { opacity: 0.6; cursor: default; }
.cb-summary .mk-note { margin: 10px 0 0; text-align: left; }
.cb-summary .fb-result { margin-top: 12px; }
.cb-copy { width: 100%; box-sizing: border-box; margin: 6px 0 8px; font: 12.5px/1.45 Consolas, "Cascadia Mono", monospace; color: var(--mk-fg); background: var(--mk-card); border: 1px solid var(--mk-line-2); border-radius: 8px; padding: 8px; resize: vertical; }

/* highlights elsewhere */
.topbar nav a.nav-custom { color: var(--mk-fg, inherit); opacity: 1; font-weight: 600; position: relative; }
.topbar nav a.nav-custom::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: linear-gradient(135deg, var(--mk-a1, #4dabf7), var(--mk-a2, #9775fa)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-a1, #4dabf7) 25%, transparent); }
.mk-pill-custom { margin-top: 18px; }
.mk-pill-custom b { background: linear-gradient(90deg, #f59f00, #f76707); }
.mk-custom-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin: 22px 0 6px; padding: 18px 22px; border-radius: 16px; text-decoration: none; color: var(--mk-fg);
  background: linear-gradient(120deg, color-mix(in srgb, var(--mk-a1) 14%, var(--mk-card)), color-mix(in srgb, var(--mk-a2) 14%, var(--mk-card)));
  border: 1px solid color-mix(in srgb, var(--mk-a2) 45%, transparent); transition: transform 0.15s, box-shadow 0.15s; }
.mk-custom-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -18px color-mix(in srgb, var(--mk-a2) 70%, transparent); }
.mk-custom-tag { justify-self: start; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, #f59f00, #f76707); white-space: nowrap; }
.mk-custom-text { font-size: 15px; line-height: 1.5; color: var(--mk-muted); }
.mk-custom-text b { display: block; color: var(--mk-fg); font-size: 17px; }

@media (max-width: 960px) {
  .cb-wrap { grid-template-columns: 1fr; }
  .cb-side { position: static; }
  .mk-custom-cta { grid-template-columns: 1fr; text-align: left; }
}
@media (max-width: 600px) {
  .cb-row2 { grid-template-columns: 1fr; }
  .cb-feature { grid-template-columns: 20px minmax(0, 1fr); }
  .cb-ed { grid-column: 2; justify-self: start; }
}
