/* Shared command catalog: native disclosure groups on the homepage, open groups in the Bot Center. */
.bcc-catalog { --bcc-line: rgba(197,160,89,.28); --bcc-soft-line: rgba(255,255,255,.1); }
.bcc-catalog :is(section[id],details[id],article[id]) { scroll-margin-top: 105px; }
.bcc-catalog code { overflow-wrap: anywhere; }
.bcc-catalog .bcc-command-group + .bcc-command-group { margin-top: 42px; }
.bcc-catalog .bcc-group-heading { margin-bottom: 25px; }
.bcc-catalog .bcc-command-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.bcc-catalog .bcc-command-card { --bcc-card-padding: 24px; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; padding: var(--bcc-card-padding); }
.bcc-catalog .bcc-command-card h3 { margin: calc(-1 * var(--bcc-card-padding)) calc(-1 * var(--bcc-card-padding)) 20px; padding: 16px 22px; border-bottom: 1px solid var(--bcc-line); border-radius: 3px 3px 0 0; background: linear-gradient(100deg,rgba(197,160,89,.1),rgba(197,160,89,.035)); font-size: 1rem; line-height: 1.5; }
.bcc-catalog .bcc-command-card h3 code { display: block; color: #e2c58a; font-size: 1.22rem; font-weight: 700; }
.bcc-catalog .bcc-command-body { display: grid; grid-template-columns: minmax(0,1fr) 160px; align-items: start; gap: 20px; }
.bcc-catalog .bcc-command-copy { min-width: 0; }
.bcc-catalog .bcc-command-card p { margin: 0; }
.bcc-catalog .bcc-command-summary { color: var(--text-main, #eee); font-size: 1.08rem; line-height: 1.5; font-weight: 600; }
.bcc-catalog .bcc-command-card .bcc-command-detail { margin-top: 10px; color: var(--text-muted); font-size: 1rem; line-height: 1.75; }
.bcc-catalog .bcc-command-syntax { margin-top: 16px; }
.bcc-catalog .bcc-command-syntax > span { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: .8rem; }
.bcc-catalog .bcc-command-syntax code { display: block; color: var(--text-muted); font-size: .8rem; line-height: 1.8; }
.bcc-catalog .bcc-command-example { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--bcc-soft-line); }
.bcc-catalog .bcc-command-example > span { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: .8rem; }
.bcc-catalog .bcc-command-example code { display: block; color: #dfc28d; font-size: .82rem; line-height: 1.8; }
.bcc-catalog .bcc-command-card .bcc-command-note { margin-top: 14px; padding-left: 12px; border-left: 2px solid var(--bcc-line); color: var(--text-muted); font-size: .85rem; line-height: 1.7; }
.bcc-catalog .bcc-command-media { min-width: 0; width: 160px; margin: 0; }
/* Reuse the homepage logbook porthole, including its existing glass reflection. */
.bcc-catalog .bcc-command-image { display: block; width: 160px; height: 160px; }
.bcc-catalog .bcc-command-image img { object-fit: cover; object-position: left top; padding: 0; transform: scale(2); transform-origin: top left; }
.bcc-catalog .bcc-command-image:focus-within { outline: 2px solid var(--accent-gold); outline-offset: 5px; }
.bcc-catalog .bcc-command-image-placeholder { display: grid; align-content: center; justify-items: center; gap: 9px; width: 100%; height: 100%; padding: 24px; color: var(--text-muted); text-align: center; }
.bcc-catalog .bcc-command-image-placeholder svg { width: 25px; height: 25px; color: var(--accent-gold); }
.bcc-catalog .bcc-command-image-placeholder span { font-size: .85rem; line-height: 1.5; }
.bcc-catalog .bcc-command-zoom { position: absolute; z-index: 2; right: 20px; bottom: 20px; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--bcc-line); border-radius: 50%; background: rgba(10,13,15,.88); color: var(--accent-gold); pointer-events: none; }
.bcc-catalog .bcc-command-zoom svg { width: 14px; height: 14px; }

.bcc-catalog--compact .bcc-command-group { border-block: 1px solid var(--bcc-soft-line); }
.bcc-catalog--compact .bcc-command-group + .bcc-command-group { margin-top: 12px; }
.bcc-catalog--compact summary { display: flex; align-items: center; gap: 14px; padding-block: 20px; list-style: none; cursor: pointer; }
.bcc-catalog--compact summary::-webkit-details-marker { display: none; }
.bcc-catalog--compact summary > svg { width: 24px; height: 24px; flex: none; color: var(--accent-gold); }
.bcc-catalog--compact .bcc-group-label { color: var(--accent-gold); font-family: 'FH Clean','IBM Plex Sans',sans-serif; font-size: 1.1rem; line-height: 1.5; font-weight: 600; }
.bcc-catalog--compact .bcc-group-count { display: inline-grid; place-items: center; min-width: 28px; height: 26px; margin-left: auto; padding-inline: 6px; border: 1px solid var(--bcc-line); border-radius: 3px; color: var(--text-muted); font-size: .8rem; }
.bcc-catalog--compact summary .bcc-group-chevron { width: 18px; height: 18px; }
.bcc-catalog--compact details[open] .bcc-group-chevron { transform: rotate(180deg); }
.bcc-catalog--compact .bcc-group-intro { max-width: 940px; margin: 0 0 22px; color: var(--text-muted); font-size: 1rem; line-height: 1.75; }
.bcc-catalog--compact .bcc-command-grid { margin-bottom: 24px; }
.bcc-catalog summary:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 4px; }

.bc-user-commands .bcc-topic-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.bc-user-commands .bcc-topic-links a { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 16px; border: 1px solid var(--bc-soft-line); border-radius: 4px; background: rgba(255,255,255,.025); color: var(--text-main, #eee); font-size: .95rem; line-height: 1.5; text-decoration: none; transition: background .2s ease,border-color .2s ease; }
.bc-user-commands .bcc-topic-links a:hover { border-color: var(--bc-line); background: rgba(255,255,255,.06); }
.bc-user-commands .bcc-topic-links a > svg { width: 20px; height: 20px; color: var(--accent-gold); }
.bc-user-commands .bcc-topic-links a > svg:last-child { width: 16px; height: 16px; margin-left: auto; }
.bc-user-commands .bcc-start-note { max-width: 940px; margin: 24px 0 0; padding-left: 17px; border-left: 2px solid var(--bc-line); font-size: 1rem; line-height: 1.8; }
.bc-user-commands .bcc-topic-section { margin-block: 58px; }
.bc-user-commands .bcc-next { padding-top: 30px; border-top: 1px solid var(--bc-soft-line); }

@media (max-width: 1100px) {
    .bcc-catalog .bcc-command-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 900px) {
    .bc-user-commands .bcc-topic-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .bcc-catalog .bcc-command-body { grid-template-columns: minmax(0,1fr); gap: 24px; }
    .bcc-catalog .bcc-command-media { justify-self: center; }
}
@media (max-width: 560px) {
    .bcc-catalog .bcc-command-card { --bcc-card-padding: 23px; }
    .bcc-catalog .bcc-command-card h3 { padding: 15px 20px; }
    .bcc-catalog .bcc-command-card h3 code { font-size: 1.15rem; }
    .bcc-catalog--compact summary { gap: 10px; padding-block: 17px; }
    .bcc-catalog--compact .bcc-group-label { font-size: 1rem; }
    .bcc-catalog--compact summary > svg { width: 21px; height: 21px; }
    .bc-user-commands .bcc-topic-links { grid-template-columns: minmax(0,1fr); }
    .bc-user-commands .bcc-topic-section { margin-block: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .bcc-catalog *, .bc-user-commands .bcc-topic-links a { transition: none; }
}
