/*
 * CommandBox home page components. Loaded after home.css and scoped under
 * .bxsites-home, so it reuses the same custom properties (--surface, --border,
 * --text, --muted, --brand1, --brand2 ...) and follows the same light/dark toggle.
 */
.bxsites-home {
	--cb-term: #050b13;
	--cb-term-bar: #08131e;
	--cb-term-line: #15283a;
	--cb-term-fg: #d7e6ec;
	--cb-ink: #03130c;
}
.bxsites-home .cb-sec { padding-block: 72px; position: relative; }
.bxsites-home .cb-sec.alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.bxsites-home .cb-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 760px; }
.bxsites-home .cb-head.c { margin-inline: auto; text-align: center; align-items: center; }
.bxsites-home .cb-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
.bxsites-home .cb-head p { color: var(--muted); font-size: 1.06rem; max-width: 62ch; margin: 0; }
.bxsites-home .cb-ph { width: 1.35em; height: 1.35em; flex: none; vertical-align: -.25em; }
.bxsites-home .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.bxsites-home code.cb-c { font-family: var(--mono); font-size: .85em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.bxsites-home .cb-rv { transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s; transition-delay: var(--d, 0s); }
.bxsites-home .cb-rv.pre { opacity: .001; transform: translateY(24px); }

/* hero */
.bxsites-home .cb-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.bxsites-home .cb-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; color: var(--cb-ink); background: var(--grad); text-decoration: none; }
.bxsites-home .cb-rot { display: inline-block; transition: opacity .35s, transform .35s; }
.bxsites-home .cb-rot.out { opacity: 0; transform: translateY(-10px); }
.bxsites-home .cb-cur { display: inline-block; width: .5ch; height: 1em; background: var(--brand1); vertical-align: -2px; margin-left: 2px; animation: cbblink 1s steps(2) infinite; }
@keyframes cbblink { 50% { opacity: 0; } }
.bxsites-home .cb-install { background: var(--cb-term); border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; max-width: 560px; margin-top: 24px; }
.bxsites-home .cb-install .tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--cb-term-line); overflow-x: auto; }
.bxsites-home .cb-install .tabs button { font: inherit; font-size: .78rem; font-weight: 600; color: #8ea6b4; background: none; border: 0; padding: 5px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.bxsites-home .cb-install .tabs button.on { background: #132536; color: #e8f2f5; }
.bxsites-home .cb-install .cmd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #dff3ee; font-family: var(--mono); font-size: .84rem; }
.bxsites-home .cb-install .cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: none; border: 0; color: inherit; padding: 0; }
.bxsites-home .cb-install .pr { color: var(--brand1); user-select: none; }
.bxsites-home .cb-copy { font: inherit; font-size: .74rem; font-weight: 800; color: var(--cb-ink); background: var(--grad); border: 0; border-radius: 7px; padding: 5px 10px; cursor: pointer; flex: none; }
.bxsites-home .cb-needs { font-size: .9rem; color: var(--muted); margin: 10px 0 0; }

/* terminal windows */
.bxsites-home .cb-win { background: var(--cb-term); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 18px 50px -20px var(--shadow-color); overflow: hidden; color: var(--cb-term-fg); min-width: 0; }
.bxsites-home .cb-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--cb-term-line); background: var(--cb-term-bar); }
.bxsites-home .cb-dots { display: flex; gap: 6px; }
.bxsites-home .cb-dots i { width: 11px; height: 11px; border-radius: 50%; background: #26394a; display: block; }
.bxsites-home .cb-bar .ft { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
.bxsites-home .cb-bar .ft span, .bxsites-home .cb-bar .ft button { font: inherit; font-family: var(--mono); font-size: .75rem; color: #e8f2f5; background: #13283a; border: 0; padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
.bxsites-home .cb-bar .ft button { color: #7f97a7; background: none; cursor: pointer; }
.bxsites-home .cb-bar .ft button.on { background: #13283a; color: #e8f2f5; }
.bxsites-home .cb-bar .cp { margin-left: auto; font: inherit; font-size: .72rem; font-weight: 800; color: var(--cb-ink); background: var(--grad); border: 0; border-radius: 6px; padding: 3px 9px; cursor: pointer; flex: none; }
.bxsites-home .cb-term { padding: 16px 18px; font-family: var(--mono); font-size: .84rem; line-height: 1.75; min-height: 290px; }
.bxsites-home .cb-term .l { white-space: pre-wrap; word-break: break-word; }
.bxsites-home .cb-term .ok { color: #9ff5c8; }
.bxsites-home .cb-term .pm { color: var(--brand1); }
.bxsites-home .cb-term .d { color: #5f7a8c; }
.bxsites-home .cb-win pre { margin: 0; padding: 16px 18px; font-size: .84rem; line-height: 1.7; overflow-x: auto; background: none; color: var(--cb-term-fg); border: 0; }
.bxsites-home .cb-win pre .k { color: #ff7ab6; } .bxsites-home .cb-win pre .s { color: #9ff5a0; } .bxsites-home .cb-win pre .f { color: #62d8ff; } .bxsites-home .cb-win pre .c { color: #56707f; font-style: italic; } .bxsites-home .cb-win pre .n { color: #ffcf6e; } .bxsites-home .cb-win pre .v { color: #e8f2f5; }

/* stats with logos */
.bxsites-home .cb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.bxsites-home .cb-stats > div { padding: 20px 22px; border-right: 1px solid var(--border); display: flex; gap: 14px; align-items: center; min-width: 0; }
.bxsites-home .cb-stats > div:last-child { border-right: 0; }
.bxsites-home .cb-stats img, .bxsites-home .cb-stats .ic { width: 40px; height: 40px; flex: none; }
.bxsites-home .cb-stats .ic { display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--brand1); }
.bxsites-home .cb-stats b { display: block; font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.bxsites-home .cb-stats span { color: var(--muted); font-size: .86rem; line-height: 1.35; display: block; }
@media (max-width: 860px) { .bxsites-home .cb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bxsites-home .cb-stats > div:nth-child(2) { border-right: 0; } .bxsites-home .cb-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }

/* diagram */
.bxsites-home .cb-diagram { border: 1px solid var(--border); border-radius: 20px; background: radial-gradient(80% 60% at 50% 0%, var(--glow), transparent 70%), var(--surface); padding: 20px; overflow-x: auto; }
.bxsites-home .cb-diagram svg { display: block; width: 100%; min-width: 760px; height: auto; }
.bxsites-home .dn rect { fill: var(--raised); stroke: var(--border-strong); stroke-width: 1.5; }
.bxsites-home .dn text { fill: var(--text); font-family: var(--body-font); font-weight: 700; font-size: 15px; }
.bxsites-home .dn .sub { fill: var(--muted); font-weight: 500; font-size: 11.5px; font-family: var(--mono); }
.bxsites-home .dn.hot rect { stroke: var(--brand1); } .bxsites-home .dn.hot2 rect { stroke: var(--brand2); }
.bxsites-home .dp { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 6 7; animation: cbdash 1.2s linear infinite; }
.bxsites-home .dp.hot { stroke: var(--brand1); opacity: .75; }
@keyframes cbdash { to { stroke-dashoffset: -26; } }
.bxsites-home .dd { fill: var(--brand1); filter: drop-shadow(0 0 6px var(--brand1)); } .bxsites-home .dd.c2 { fill: var(--brand2); filter: drop-shadow(0 0 6px var(--brand2)); }
.bxsites-home .dlab { fill: var(--muted-2); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; }

/* command explorer + tabs */
.bxsites-home .cb-tabbar { display: flex; gap: 6px; flex-wrap: wrap; }
.bxsites-home .cb-tabbar button { font: inherit; font-weight: 700; font-size: .88rem; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.bxsites-home .cb-tabbar button.on { color: var(--cb-ink); background: var(--grad); border-color: transparent; }
.bxsites-home .cb-cmdx { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; margin-top: 18px; align-items: start; }
@media (max-width: 900px) { .bxsites-home .cb-cmdx { grid-template-columns: minmax(0, 1fr); } }
.bxsites-home .cb-cmdlist { display: grid; gap: 8px; }
.bxsites-home .cb-cmdlist button { font: inherit; text-align: left; cursor: pointer; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; transition: all .2s; }
.bxsites-home .cb-cmdlist button:hover { border-color: var(--border-strong); transform: translateX(3px); }
.bxsites-home .cb-cmdlist button.on { border-color: var(--brand1); box-shadow: 0 0 0 1px var(--brand1); background: color-mix(in oklab, var(--brand1) 7%, var(--surface)); }
.bxsites-home .cb-cmdlist code { font-family: var(--mono); font-size: .84rem; color: var(--brand1); white-space: nowrap; background: none; border: 0; padding: 0; }
.bxsites-home .cb-cmdlist span { color: var(--muted); font-size: .86rem; margin-left: auto; text-align: right; }
@media (max-width: 560px) { .bxsites-home .cb-cmdlist button { flex-direction: column; align-items: flex-start; gap: 2px; } .bxsites-home .cb-cmdlist span { margin-left: 0; text-align: left; } }

/* recordings player */
.bxsites-home .cb-pbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--cb-term-line); background: var(--cb-term-bar); }
.bxsites-home .cb-pbar button { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--cb-ink); background: var(--grad); flex: none; }
.bxsites-home .cb-pbar input { flex: 1; accent-color: #00ff78; }
.bxsites-home .cb-pbar span { font-family: var(--mono); font-size: .74rem; color: #7f97a7; min-width: 80px; text-align: right; }
.bxsites-home .cb-rec-tabs { margin-bottom: 14px; }

/* feature + module cards */
.bxsites-home .cb-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .bxsites-home .cb-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bxsites-home .cb-grid4 { grid-template-columns: minmax(0, 1fr); } }
.bxsites-home .cb-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; transition: transform .2s, border-color .2s, box-shadow .2s; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.bxsites-home .cb-card:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--brand1) 55%, var(--border)); box-shadow: 0 18px 40px -22px var(--shadow-color); }
.bxsites-home .cb-card h3 { font-size: 1.08rem; font-weight: 700; margin: 0; }
.bxsites-home .cb-card p { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.bxsites-home .cb-card .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--brand1); margin-bottom: 8px; }
.bxsites-home .cb-card .ic .cb-ph { width: 24px; height: 24px; }
.bxsites-home .cb-card img.logo { width: 40px; height: 40px; margin-bottom: 8px; }
.bxsites-home .cb-span2 { grid-column: span 2; }
@media (max-width: 560px) { .bxsites-home .cb-span2 { grid-column: auto; } }
.bxsites-home .cb-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bxsites-home .cb-chips span { display: inline-flex; gap: 7px; align-items: center; font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); }
.bxsites-home .cb-chips .cb-ph { width: 1.2em; height: 1.2em; color: var(--brand1); }
.bxsites-home .cb-cpy { display: flex; gap: 8px; align-items: center; background: var(--cb-term); border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px 6px 6px 10px; }
.bxsites-home .cb-cpy code { flex: 1; min-width: 0; white-space: normal; word-break: break-all; line-height: 1.4; background: none; border: 0; padding: 0; color: #dff3ee; font-size: .78rem; font-family: var(--mono); }

/* split + code tabs + built-on cards */
.bxsites-home .cb-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .bxsites-home .cb-split { grid-template-columns: minmax(0, 1fr); } }
.bxsites-home .cb-ctabs { display: flex; gap: 4px; margin-bottom: -1px; }
.bxsites-home .cb-ctabs button { font: inherit; font-size: .8rem; font-weight: 700; padding: 7px 14px; border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.bxsites-home .cb-ctabs button.on { background: var(--cb-term); color: #e8f2f5; }
.bxsites-home .cb-ctabs + .cb-win { border-top-left-radius: 0; }
.bxsites-home .cb-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .bxsites-home .cb-three { grid-template-columns: minmax(0, 1fr); } }
.bxsites-home .cb-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--brand1); flex: none; display: inline-block; margin-right: 10px; animation: cbpulse 2.4s ease-in-out infinite; }
@keyframes cbpulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand1) 50%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.bxsites-home .cb-fbpk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .bxsites-home .cb-fbpk { grid-template-columns: minmax(0, 1fr); } }
.bxsites-home .cb-fbpk .cb-card { padding: 16px; }
.bxsites-home .cb-fbpk .row { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.bxsites-home .cb-fbpk .row img { width: 32px; height: 32px; }
.bxsites-home .cb-fbpk .row small { display: block; color: var(--muted); line-height: 1.2; }

/* course teaser */
.bxsites-home .cb-course { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px; }
.bxsites-home .cb-progress { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.bxsites-home .cb-progress i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.bxsites-home .cb-lessons { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: .94rem; }
.bxsites-home .cb-lessons li { display: flex; gap: 10px; align-items: center; }
.bxsites-home .cb-chk { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; font-size: .6rem; }
.bxsites-home .cb-chk.done { background: var(--brand1); border-color: var(--brand1); color: var(--cb-ink); }

/* professional open source */
.bxsites-home .cb-pro2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .bxsites-home .cb-pro2 { grid-template-columns: minmax(0, 1fr); } }
.bxsites-home .cb-pcard { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.bxsites-home .cb-pcard.feat { border-color: var(--brand1); box-shadow: 0 0 0 1px color-mix(in oklab, var(--brand1) 35%, transparent), 0 24px 60px -30px var(--brand1); }
.bxsites-home .cb-pcard h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.bxsites-home .cb-ptag { align-self: flex-start; font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 10px; }
.bxsites-home .cb-ptag.g { color: var(--cb-ink); background: var(--grad); border-color: transparent; font-weight: 700; }
.bxsites-home .cb-ck { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.bxsites-home .cb-ck li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .95rem; }
.bxsites-home .cb-ck li b { color: var(--text); }
.bxsites-home .cb-ck .cb-ph { color: var(--brand1); margin-top: 2px; }
.bxsites-home .cb-plans { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 2px 0 4px; }
.bxsites-home .cb-plans img { height: 30px; width: auto; }
.bxsites-home .cb-chip2 { font-weight: 800; font-size: 1.05rem; color: var(--text); border: 1px solid var(--border-strong); border-radius: 10px; padding: 3px 12px; }
.bxsites-home .cb-band { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; border: 1px dashed var(--border-strong); border-radius: 16px; padding: 18px 22px; background: var(--surface); }
.bxsites-home .cb-band .t { display: flex; gap: 14px; align-items: center; }
.bxsites-home .cb-band .t b { display: block; }
.bxsites-home .cb-band .t span.s { color: var(--muted); font-size: .9rem; }
.bxsites-home .cb-band .pi { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--brand1); flex: none; }
.bxsites-home .cb-logo-d { display: none; }
[data-theme="dark"] .bxsites-home .cb-logo-d { display: inline-block; }
[data-theme="dark"] .bxsites-home .cb-logo-l { display: none; }

/* FAQ */
.bxsites-home .cb-faq details { border-bottom: 1px solid var(--border); }
.bxsites-home .cb-faq summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: center; padding: 16px 4px; font-weight: 700; }
.bxsites-home .cb-faq summary::-webkit-details-marker { display: none; }
.bxsites-home .cb-faq summary::after { content: "+"; margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--brand1); font-weight: 800; flex: none; transition: transform .2s; }
.bxsites-home .cb-faq details[open] summary::after { transform: rotate(45deg); }
.bxsites-home .cb-faq p { padding: 0 4px 18px; color: var(--muted); max-width: 80ch; margin: 0; }
.bxsites-home .cb-faq code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-size: .86em; }

@media (prefers-reduced-motion: reduce) {
	.bxsites-home .dp, .bxsites-home .cb-cur, .bxsites-home .cb-pulse { animation: none !important; }
	.bxsites-home .dd { display: none; }
	.bxsites-home .cb-rv.pre { opacity: 1; transform: none; }
}
