/* Shared global controls and semantic editorial/application components. */
.hub-icon-button { display: inline-grid; place-items: center; min-width: var(--hub-control-min); width: var(--hub-control-min); height: var(--hub-control-min); padding: var(--hub-space-2); border: 1px solid var(--hub-color-border); border-radius: var(--hub-radius-md); background: var(--hub-color-surface); color: var(--hub-color-text); text-decoration: none; }
.hub-icon-button:hover { background: var(--hub-color-surface-muted); color: var(--hub-color-text); }
.hub-icon-button svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-submenu-toggle { border-color: transparent; background: transparent; }
.hub-button, input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; min-height: var(--hub-control-min); padding: var(--hub-space-2) var(--hub-space-4); border: 1px solid transparent; border-radius: var(--hub-radius-sm); background: var(--hub-color-accent); color: var(--hub-color-on-accent); font-size: var(--hub-text-sm); font-weight: var(--hub-weight-semibold); line-height: var(--hub-leading-control); text-decoration: none; transition: background-color var(--hub-motion-fast) var(--hub-ease); }
.hub-button:hover, input[type="submit"]:hover { background: var(--hub-color-accent-hover); color: var(--hub-color-on-accent); }
:where(input[type="search"], input[type="text"], input[type="email"], input[type="url"], input[type="password"], textarea, select) { width: 100%; min-height: var(--hub-control-min); padding: var(--hub-space-2) var(--hub-space-3); border: 1px solid var(--hub-color-border-strong); border-radius: var(--hub-radius-sm); background: var(--hub-color-surface); color: var(--hub-color-text); font-size: 1rem; }
input::placeholder, textarea::placeholder { color: var(--hub-color-text-muted); opacity: 1; }
textarea { resize: vertical; }
.hub-search-form > label { display: block; font-size: var(--hub-text-sm); font-weight: var(--hub-weight-semibold); margin-bottom: var(--hub-space-2); }
.hub-search-fields { display: flex; align-items: stretch; gap: var(--hub-space-2); }
.hub-search-fields input { min-width: 0; flex: 1 1 0%; }
.hub-search-fields button { flex: 0 0 auto; }
.hub-sidebar-search .hub-search-fields { flex-wrap: wrap; }
.hub-sidebar-search .hub-search-fields input { flex-basis: 100%; }
.hub-sidebar-search .hub-search-fields button { width: 100%; }
.hub-search-dialog { width: min(36rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: var(--hub-space-6); border: 1px solid var(--hub-color-border); border-radius: var(--hub-radius-lg); background: var(--hub-color-surface); color: var(--hub-color-text); box-shadow: var(--hub-shadow-dialog); }
.hub-search-dialog::backdrop { background: var(--hub-color-overlay); }
.hub-search-dialog:not([open]) { display: none; }
.hub-search-hint, .hub-search-status { margin-top: var(--hub-space-3); color: var(--hub-color-text-muted); font-size: var(--hub-text-sm); }
.hub-search-status:empty { margin: 0; }
.hub-search-group + .hub-search-group { margin-top: var(--hub-space-8); padding-top: var(--hub-space-6); border-top: 1px solid var(--hub-color-border); }
.hub-live-results section + section { margin-top: var(--hub-space-5); }
.hub-live-results h3 { font-size: var(--hub-text-lg); margin-bottom: var(--hub-space-2); }
.hub-live-results ul, .cm26-search-list { list-style: none; margin: 0; padding: 0; }
.hub-live-results li + li, .cm26-search-list > li + li { margin-top: var(--hub-space-4); padding-top: var(--hub-space-4); border-top: 1px solid var(--hub-color-border); }
.hub-live-results li > a { display: block; padding-block: var(--hub-space-2); min-height: var(--hub-control-min); overflow-wrap: anywhere; }
.hub-live-results li p { margin-bottom: var(--hub-space-2); font-size: var(--hub-text-sm); }
.hub-live-results > a { display: inline-flex; align-items: center; min-height: var(--hub-control-min); margin-top: var(--hub-space-4); }
.cm26-search-list > li { scroll-margin-top: calc(var(--hub-header-offset, 0px) + var(--hub-space-6)); overflow-wrap: anywhere; }
.hub-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: var(--hub-space-4); margin-bottom: var(--hub-space-5); }
.hub-dialog-heading h2 { font-size: var(--hub-text-h3); margin: 0; }
.hub-entry-header { margin-bottom: var(--hub-space-6); padding-bottom: var(--hub-space-5); border-bottom: 1px solid var(--hub-color-border); }
.hub-entry-header h1 { margin-bottom: var(--hub-space-3); }
.hub-entry-meta { color: var(--hub-color-text-muted); font-size: var(--hub-text-sm); }
.hub-entry-lead { margin-top: var(--hub-space-4); font-size: var(--hub-text-lg); }
.hub-editorial-content { min-width: 0; }
.hub-editorial-content > :last-child { margin-bottom: 0; }
.hub-editorial-content :is(h2, h3, h4) { margin-top: var(--hub-space-8); }
.hub-empty-message { padding-block: var(--hub-space-6); color: var(--hub-color-text-muted); }
.hub-empty-entry .hub-search { margin-top: var(--hub-space-6); }
.hub-post-list { padding: 0; margin: 0; list-style: none; }
.hub-post-list > li + li { margin-top: var(--hub-space-6); padding-top: var(--hub-space-6); border-top: 1px solid var(--hub-color-border); }
.hub-list-entry :is(h2, h3) { margin-bottom: var(--hub-space-2); font-size: var(--hub-text-h3); }
.hub-list-entry :is(h2, h3) a { text-decoration: none; }
.hub-entry-excerpt { color: var(--hub-color-text-muted); }
.hub-pagination ul, .hub-page-links { display: flex; flex-wrap: wrap; gap: var(--hub-space-2); padding: 0; margin: var(--hub-space-8) 0 0; list-style: none; }
.hub-pagination .page-numbers, .hub-page-links .page-numbers { display: inline-grid; place-items: center; min-width: var(--hub-control-min); min-height: var(--hub-control-min); padding: var(--hub-space-2); border: 1px solid var(--hub-color-border); border-radius: var(--hub-radius-sm); }
.hub-pagination .current { background: var(--hub-color-accent); color: var(--hub-color-on-accent); }
.hub-collection > .hub-search { margin-bottom: var(--hub-space-6); }
.hub-comments { margin-top: var(--hub-space-10); padding-top: var(--hub-space-6); border-top: 1px solid var(--hub-color-border); }
.hub-comment-list { padding: 0; list-style: none; }
.hub-comment-list .children { list-style: none; padding-inline-start: var(--hub-space-5); }
.hub-comment-list .comment-body { margin-block: var(--hub-space-5); padding: var(--hub-space-4); background: var(--hub-color-surface-muted); border-radius: var(--hub-radius-md); }
.hub-comment-list .comment-meta { font-size: var(--hub-text-sm); margin-bottom: var(--hub-space-3); }
.hub-comment-list .avatar { border-radius: var(--hub-radius-pill); margin-inline-end: var(--hub-space-2); }
.hub-comments label { display: block; font-size: var(--hub-text-sm); }
.hub-comments .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: var(--hub-space-2); }
.hub-comments .comment-form-cookies-consent input { margin-top: .4em; }
.hub-comments .comment-form-cookies-consent label { display: inline; }
@media (max-width: 39.99rem) { .hub-search-fields { flex-wrap: wrap; } .hub-search-fields input { flex-basis: 100%; } .hub-search-fields button { width: 100%; } }

/* Breadcrumb and the single SSR TOC use native links without a JS dependency. */
.hub-breadcrumbs { margin-bottom: var(--hub-space-5); color: var(--hub-color-text-muted); font-size: var(--hub-text-xs); }
.hub-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--hub-space-2) var(--hub-space-3); padding: 0; margin: 0; list-style: none; }
.hub-breadcrumbs li { display: inline-flex; align-items: baseline; gap: var(--hub-space-3); min-width: 0; }
.hub-breadcrumbs li + li::before { content: ""; flex: 0 0 auto; width: .4rem; height: .4rem; border-block-start: 1px solid currentColor; border-inline-end: 1px solid currentColor; transform: rotate(45deg); }
.hub-breadcrumbs a { text-decoration: none; }
.hub-breadcrumbs [aria-current] { overflow-wrap: anywhere; }
.hub-toc { margin: 0; }
[data-hub-toc-slot]:empty { display: none; }
[data-hub-toc-slot="inline"]:not(:empty) { margin-bottom: var(--hub-space-6); }
.hub-toc-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--hub-space-3); }
.hub-toc-heading .hub-panel-title { margin: 0; }
.hub-toc-toggle { flex: 0 0 auto; }
.hub-toc-toggle svg { transition: transform var(--hub-motion-fast) var(--hub-ease); }
.hub-toc-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.hub-toc .hub-toc-list { margin: 0; padding: 0; list-style: none; }
.hub-toc > .hub-toc-list { margin-top: var(--hub-space-3); }
.hub-toc .hub-toc-list .hub-toc-list { padding-inline-start: var(--hub-space-4); margin-top: var(--hub-space-1); border-inline-start: 1px solid var(--hub-color-border); }
.hub-toc li + li { margin-top: var(--hub-space-1); }
.hub-toc a { display: block; padding: var(--hub-space-2); border-radius: var(--hub-radius-sm); font-size: var(--hub-text-sm); text-decoration: none; line-height: var(--hub-leading-body); overflow-wrap: anywhere; }
.hub-toc a:hover, .hub-toc a[aria-current="location"] { background: var(--hub-color-info-soft); color: var(--hub-color-link); }
.hub-toc a[aria-current="location"] { box-shadow: inset 3px 0 var(--hub-color-brand); font-weight: var(--hub-weight-semibold); }

/* CM26 owns the semantic markup and data; the theme supplies its shared styles. */
.hub-app-section { margin-bottom: var(--hub-space-8); }
.cm26-row[hidden] { display: none !important; }
.cm26-condition { margin-top: var(--hub-space-2); font-size: var(--hub-text-xs); color: var(--hub-color-text-muted); }
.cm26-clipboard-fallback { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cm26-btn-copy.is-copied { box-shadow: inset 0 0 0 2px var(--hub-color-success); }
.cm26-stats-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: var(--hub-space-3); padding: 0; margin: 0 0 var(--hub-space-5); }
.cm26-stat-item { min-width: 0; padding: var(--hub-space-4); border: 1px solid var(--hub-color-border); border-radius: var(--hub-radius-md); background: var(--hub-color-surface-muted); }
.cm26-stat-item dt { font-size: var(--hub-text-xs); color: var(--hub-color-text-muted); }
.cm26-stat-item dd { margin: var(--hub-space-1) 0 0; font-size: var(--hub-text-h3); font-weight: var(--hub-weight-semibold); line-height: var(--hub-leading-heading); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cm26-stat-item.is-active { background: var(--hub-color-success-soft); border-color: var(--hub-color-success); }
.cm26-stat-item.is-active dd { color: var(--hub-color-success); }
.cm26-filter-toolbar { display: flex; flex-wrap: wrap; gap: var(--hub-space-2); padding: 0; margin: var(--hub-space-3) 0 var(--hub-space-5); list-style: none; }
.cm26-filter-toolbar button { min-height: var(--hub-control-min); padding: var(--hub-space-2) var(--hub-space-4); border: 1px solid var(--hub-color-border-strong); border-radius: var(--hub-radius-pill); background: var(--hub-color-surface); color: var(--hub-color-text-muted); font-size: var(--hub-text-sm); font-weight: var(--hub-weight-medium); }
.cm26-filter-toolbar button:hover { background: var(--hub-color-surface-muted); color: var(--hub-color-text); }
.cm26-filter-toolbar button[aria-pressed="true"] { border-color: var(--hub-color-accent-text); background: var(--hub-color-accent); color: var(--hub-color-on-accent); }
.hub-table-responsive, .cm26-table-responsive { width: 100%; max-width: 100%; overflow-x: auto; margin-block: var(--hub-space-5); border: 1px solid var(--hub-color-border); border-radius: var(--hub-radius-md); overscroll-behavior-inline: contain; }
.hub-editorial-content table, .cm26-giftcode-table { width: 100%; border-spacing: 0; border-collapse: separate; margin: 0; font-size: var(--hub-text-sm); text-align: start; }
.hub-editorial-content table caption, .cm26-giftcode-table caption { padding: var(--hub-space-3) var(--hub-space-4); background: var(--hub-color-surface-muted); color: var(--hub-color-text-muted); font-size: var(--hub-text-xs); text-align: start; caption-side: top; }
.hub-editorial-content :is(th, td), .cm26-giftcode-table :is(th, td) { padding: var(--hub-space-4); border-block-end: 1px solid var(--hub-color-border); vertical-align: top; text-align: start; }
.hub-editorial-content thead th, .cm26-giftcode-table thead th { background: var(--hub-color-accent); color: var(--hub-color-on-accent); font-weight: var(--hub-weight-semibold); }
.hub-editorial-content tbody th, .cm26-giftcode-table tbody th { font-weight: var(--hub-weight-semibold); }
.hub-editorial-content tbody tr:last-child > *, .cm26-giftcode-table tbody tr:last-child > * { border-block-end: 0; }
.hub-editorial-content tbody tr:hover, .cm26-giftcode-table tbody tr:hover { background: var(--hub-color-surface-muted); }
.cm26-giftcode-table { min-width: 42rem; }
.cm26-giftcode-table .cm26-code-value { color: var(--hub-color-link); font-size: .875rem; }
.cm26-giftcode-table del .cm26-code-value { color: var(--hub-color-text-muted); }
.cm26-giftcode-table time, .cm26-giftcode-table data { font-variant-numeric: tabular-nums; }
.cm26-badge { display: inline-block; padding: var(--hub-space-1) var(--hub-space-2); border: 1px solid currentColor; border-radius: var(--hub-radius-pill); color: var(--hub-color-success); background: var(--hub-color-success-soft); font-size: var(--hub-text-xs); font-weight: var(--hub-weight-medium); white-space: nowrap; }
.cm26-badge.is-expired { color: var(--hub-color-danger); background: var(--hub-color-danger-soft); }
.cm26-badge.is-pending { color: var(--hub-color-accent-text); background: var(--hub-color-accent-soft); }
.cm26-action-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hub-space-2); }
.cm26-btn-copy, .cm26-btn-vote { display: inline-flex; align-items: center; justify-content: center; gap: var(--hub-space-2); min-height: var(--hub-control-min); min-width: var(--hub-control-min); padding: var(--hub-space-2) var(--hub-space-3); border: 1px solid var(--hub-color-border-strong); border-radius: var(--hub-radius-sm); background: var(--hub-color-surface); color: var(--hub-color-text); font-size: var(--hub-text-xs); font-weight: var(--hub-weight-medium); }
.cm26-btn-copy { border-color: transparent; background: var(--hub-color-accent); color: var(--hub-color-on-accent); }
.cm26-btn-copy:hover { background: var(--hub-color-accent-hover); }
.cm26-btn-vote:hover { background: var(--hub-color-surface-muted); }
.cm26-btn-vote[aria-pressed="true"] { border-color: var(--hub-color-link); background: var(--hub-color-info-soft); color: var(--hub-color-link); }
.cm26-btn-vote.is-dislike[aria-pressed="true"] { border-color: var(--hub-color-danger); background: var(--hub-color-danger-soft); color: var(--hub-color-danger); }
.cm26-vote-count { font-variant-numeric: tabular-nums; }

/* Editorial elements stay useful without JavaScript or a page builder. */
.hub-editorial-content > section + section { margin-top: var(--hub-space-10); padding-top: var(--hub-space-6); border-top: 1px solid var(--hub-color-border); }
.hub-editorial-content section > :is(h2, h3):first-child { margin-top: 0; }
.hub-callout { margin-block: var(--hub-space-5); padding: var(--hub-space-4) var(--hub-space-5); border: 1px solid var(--hub-color-border); border-inline-start: 4px solid var(--hub-color-link); border-radius: var(--hub-radius-sm); background: var(--hub-color-info-soft); }
.hub-callout.is-tip { border-inline-start-color: var(--hub-color-success); background: var(--hub-color-success-soft); }
.hub-callout.is-warning { border-inline-start-color: var(--hub-color-accent-text); background: var(--hub-color-accent-soft); }
.hub-callout.is-danger { border-inline-start-color: var(--hub-color-danger); background: var(--hub-color-danger-soft); }
.hub-callout > :last-child { margin-bottom: 0; }
.hub-steps-timeline { margin-block: var(--hub-space-5); padding-inline-start: var(--hub-space-8); }
.hub-step-item { padding-inline-start: var(--hub-space-2); padding-block-end: var(--hub-space-5); }
.hub-step-item:last-child { padding-block-end: 0; }
.hub-step-item::marker { color: var(--hub-color-link); font-size: var(--hub-text-lg); font-weight: var(--hub-weight-bold); }
.hub-step-body { padding-inline-start: var(--hub-space-4); border-inline-start: 2px solid var(--hub-color-border); }
.hub-step-body h3 { margin-top: 0; margin-bottom: var(--hub-space-2); font-size: var(--hub-text-lg); }
.hub-faq-item { margin-block: var(--hub-space-3); padding: 0; border: 1px solid var(--hub-color-border); border-radius: var(--hub-radius-md); background: var(--hub-color-surface); }
.hub-faq-item summary { min-height: var(--hub-control-min); padding: var(--hub-space-4); color: var(--hub-color-text); border-radius: var(--hub-radius-md); }
.hub-faq-item summary::marker { color: var(--hub-color-link); }
.hub-faq-item summary strong { font-weight: var(--hub-weight-semibold); }
.hub-faq-item[open] summary { background: var(--hub-color-surface-muted); border-radius: var(--hub-radius-md) var(--hub-radius-md) 0 0; border-bottom: 1px solid var(--hub-color-border); }
.hub-faq-answer, .hub-faq-item > p { padding: var(--hub-space-4); }
.hub-editorial-content :where(code:not(.cm26-code-value), kbd, samp) { padding: .125em .375em; border-radius: var(--hub-radius-sm); background: var(--hub-color-surface-muted); }
.hub-editorial-content kbd { border: 1px solid var(--hub-color-border-strong); border-bottom-width: 2px; white-space: nowrap; }
.hub-editorial-content pre { overflow-x: auto; padding: var(--hub-space-4); border: 1px solid var(--hub-color-border); border-radius: var(--hub-radius-md); background: var(--hub-color-surface-muted); }
.hub-editorial-content pre code { padding: 0; white-space: pre; overflow-wrap: normal; }
.hub-editorial-content figure { margin-block: var(--hub-space-6); }
.hub-editorial-content figure img { display: block; border-radius: var(--hub-radius-md); }
.hub-editorial-content figcaption { margin-top: var(--hub-space-2); color: var(--hub-color-text-muted); font-size: var(--hub-text-xs); }
.hub-editorial-content blockquote { margin-block: var(--hub-space-5); padding: var(--hub-space-4) var(--hub-space-5); border-inline-start: 3px solid var(--hub-color-brand); background: var(--hub-color-info-soft); }
.hub-editorial-content blockquote cite { display: block; margin-top: var(--hub-space-3); font-size: var(--hub-text-sm); }
.hub-page-links { align-items: center; }
.hub-page-links :is(a, .post-page-numbers) { display: inline-grid; place-items: center; min-width: var(--hub-control-min); min-height: var(--hub-control-min); padding: var(--hub-space-2); border: 1px solid var(--hub-color-border); border-radius: var(--hub-radius-sm); }
.hub-page-links .current { background: var(--hub-color-accent); color: var(--hub-color-on-accent); }
@media (max-width: 39.99rem) {
    .cm26-stats-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cm26-stats-list > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    .cm26-stat-item { padding: var(--hub-space-3); }
}
