:root{color-scheme:light;font-family:system-ui,sans-serif;color:#172033;background:#fff}
:root.dark{color-scheme:dark;color:#eef2f7;background:#172033}
main{margin:auto;max-width:72rem;padding:1rem}
.hidden{ display:none !important}
.badge,.setup-quota-badge,.setup-tabs-badge{display:inline-block;border-radius:1rem;padding:.15rem .5rem}
.badge-red{color:#991b1b;background:#fee2e2}
.setup-main{max-width:72rem;margin:auto}
.setup-tabs-list{ flex-wrap:wrap}
.button,.setup-button-primary,.setup-button-primary-sm,.setup-button-secondary,.setup-button-secondary-sm,.dialog-button-danger,.dialog-button-secondary{display:inline-block;padding:.5rem 1rem;border:1px solid currentColor;border-radius:.3rem;cursor:pointer}
.button-primary,.setup-button-primary,.setup-button-primary-sm{color:white;background:#1d4ed8}
.setup-button-primary-sm,.setup-button-secondary-sm{ padding:.25rem .5rem}
.button-full,.setup-button-primary-full,.setup-button-dirty-full{ width:100%}
.setup-button-secondary,.setup-button-secondary-sm,.dialog-button-secondary{background:transparent;color:inherit}
.dialog-button-danger{background:#b91c1c;color:white}
.setup-input-input,.setup-input-textarea{padding:.5rem;border:1px solid #9ca3af;border-radius:.3rem}
.setup-input-prefix{display:inline-block;padding:.5rem;border:1px solid #9ca3af}
.setup-filter-editor{ border:1px solid #9ca3af}
.x-card-text{ line-height:1.5}
.x-card-text-xs{ font-size:.75rem}
.x-card-link{ color:#1d4ed8}
.x-disappearing-500{ transition:opacity .5s}
.htmx-indicator { opacity: 0; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.peer{ position:relative}
.max-h-52{ max-height:13rem}
.border-red-500{ border-color:#ef4444}
.bg-amber-200\/70{ background:rgb(253 230 138 / 70%)}
.px-0\.5{padding-left:.125rem;padding-right:.125rem}
.font-semibold{ font-weight:600}
.font-mono{ font-family:monospace}
.card-icon{width:1.5rem;height:1.5rem}
.community-header{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}
.community-layout{display:grid;gap:1rem}
@media (min-width:48rem){
    .community-layout{ grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
}

.community-sources{display:grid;gap:1rem}
.community-toggle{display:inline-flex;align-items:center;gap:.75rem;cursor:pointer}
/* kept:position,display,flex,width,height,border-radius. */
.community-switch{position:relative;display:inline-block;flex:none;width:2.5rem;height:1.25rem;border-radius:9999px}
/* kept:position,inset,border-radius,background. */
.community-track { position: absolute; inset: 0; border-radius: inherit; background: #d1d5db; }
/* kept:styles. */
.community-knob{position:absolute;top:0;left:0;box-sizing:border-box;width:1.25rem;height:1.25rem;border:1px solid #9ca3af;border-radius:50%;background:white;transition:transform .15s}
/* kept:position,inset,width,height,margin,appearance,cursor. */
.community-switch input{position:absolute;inset:0;width:100%;height:100%;margin:0;appearance:none;cursor:pointer}
/* kept:background. */
.community-switch:has(input:checked) .community-track { background: #0284c7; }
/* kept:background. */
.dark .community-switch:has(input:checked) .community-track { background: #6366f1; }
/* kept:transform. */
.community-switch:has(input:checked) .community-knob { transform: translateX(1.25rem); }
/* kept:outline,outline-offset. */
.community-switch:has(input:focus-visible) { outline: 2px solid #0284c7; outline-offset: 2px; }
@media (min-width:48rem){
    .community-sources{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:64rem){
    .community-sources{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* kept:styles. */
#toast-container{position:fixed;top:5rem;left:1rem;right:1rem;z-index:50;display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;pointer-events:none}
/* kept:max-width,pointer-events. */
#toast-container > div{max-width:100%;pointer-events:auto}
/* kept:color. */
#toast-container svg:has(use[href="/static/icons.svg#icon-circle-check"]){color:green}
/* kept:font-size,font-weight,line-height,overflow-wrap. */
#toast-container [data-toast-text]{font-size:.875rem;font-weight:500;line-height:1.25rem;overflow-wrap:break-word}
@media (min-width:40rem){
    #toast-container{left:auto;width:100%;max-width:24rem}
}

/* kept:background. */
.plan-current{background:#e8efff}
/* kept:background. */
.dark .plan-current{background:#293c60}
/* kept:border-radius. */
.plan-current-top{border-radius:.5rem .5rem 0 0}
/* kept:border-radius. */
.plan-current-bottom{border-radius:0 0 .5rem .5rem}
/* kept:color. */
.plan-not-included{color:#6b7280}
/* kept:display,color,font-weight. */
.plan-current-label{display:block;color:#6b7280;font-weight:normal}


/* kept:display,gap,border,padding,margin. */
.date-format-choices{display:flex;gap:.5rem;border:0;padding:0;margin:.5rem 0 0}
/* kept:display,padding,border,border-radius,cursor. */
.date-format-pill{display:inline-block;padding:.5rem 1rem;border:1px solid currentColor;border-radius:9999px;cursor:pointer}
/* kept:color,background. */
.peer:checked + .date-format-pill{color:white;background:#1d4ed8}
/* kept:outline,outline-offset. */
.peer:focus-visible + .date-format-pill{outline:2px solid #1d4ed8;outline-offset:2px}

/* kept:min-height,display,grid-template-columns. */
.auth-shell{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}
/* kept:background,color,padding,display,flex-direction,justify-content. */
.auth-side{background:var(--brand-navy);color:#fff;padding:48px;display:flex;flex-direction:column;justify-content:space-between}
/* kept:color. */
.auth-side h2,body:has(.auth-shell) .auth-side a{color:#fff}
/* kept:display,align-items,justify-content,padding. */
.auth-form-col{display:flex;align-items:center;justify-content:center;padding:32px}
/* kept:width,max-width. */
.auth-form-wrap{width:100%;max-width:25rem}
/* kept:margin-top. */
.auth-form-wrap label{margin-top:1rem}
/* kept:margin-top. */
.auth-form-wrap .btn-nexa{margin-top:1rem}
/* kept:display. */
.auth-error{display:flex}
/* kept:display,flex-wrap,gap,margin-top,font-size. */
.auth-footer{display:flex;flex-wrap:wrap;gap:1rem;margin-top:1.5rem;font-size:.85rem}
@media (max-width:992px){
    .auth-shell{grid-template-columns:1fr}
    .auth-side{display:none}
}

/* kept:grid-template-columns. */
.wizard-shell{grid-template-columns:1fr}
/* kept:width. */
.wizard-progress-first{width:50%}
/* kept:width. */
.wizard-progress-complete{width:100%}

/* kept:styles. */
#delete-account-dialog.modal[open]{display:block;width:100%;height:100%;max-width:none;max-height:none;padding:0;border:0;background:transparent}
/* kept:background. */
#delete-account-dialog::backdrop{background:rgb(0 0 0 / 50%)}
/* kept:margin. */
#delete-account-dialog .modal-dialog{margin:1.75rem auto}
/* kept:max-height,overflow-y. */
#delete-account-dialog .modal-body{max-height:85vh;overflow-y:auto}
/* kept:min-height,display,place-items. */
.billing-wait{min-height:100vh;display:grid;place-items:center}
/* kept:width,pointer-events. */
#toast-container > .alert-nexa{width:fit-content;pointer-events:auto}

#tab_account .usage-heading{font-size:.75rem;color:#6b7280;text-transform:uppercase}
#tab_account .usage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}

.documentation-nav{position:sticky;top:2rem;display:grid;gap:.75rem}
.ct-postbox__content pre{overflow-x:auto;padding:1rem;background:var(--bma-surface,#f5f3ef)}
.ct-postbox__content table{width:100%;border-collapse:collapse}
.ct-postbox__content th,.ct-postbox__content td{padding:.5rem;border-bottom:1px solid #ddd}

.nexa-main,.card-nexa,.ct-postbox__content,.auth-form-wrap{min-width:0;overflow-wrap:anywhere}
.topbar-actions,.page-header-nexa,.date-format-choices,#tab_api .input-group-nexa{flex-wrap:wrap}
.setup-filter-editor,.cm-editor,.mcp-code{max-width:100%;min-width:0}
.dark body,.dark main,.dark .ct-offcanvas,.dark .ct-price__item,.dark .ct-service__item,.dark .ct-contact__form,.dark .accordion-items{background-color:var(--bma-surface);color:var(--bma-text)}
.dark h1,.dark h2,.dark h3,.dark h4,.dark p,.dark th,.dark td,.dark .accordion-buttons{color:var(--bma-text)}

.nexa-topbar{flex-wrap:wrap;gap:.5rem}
.nexa-topbar > *,.topbar-actions > *{min-width:0;overflow-wrap:anywhere}
#tab_account .card-nexa-header{justify-content:flex-start;gap:.75rem}
#tab_account .card-nexa-header h2{font-size:1.1rem;margin:0}
#tab_account [aria-describedby] svg{width:1rem;height:1rem}
.peer:checked + .date-format-pill{background:var(--primary);border-color:var(--primary)}
.admin-switch-row{display:flex;align-items:center;gap:.75rem}
#tab_email h2,#tab_email h3{font-size:1.1rem;text-transform:none;letter-spacing:normal}
#setup-results-filter{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;padding:1rem}
#setup-results-filter fieldset{display:flex;gap:.75rem;border:0;margin:0;padding:0}
.wizard-shell .auth-form-col{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem}
.wizard-shell .card-nexa{padding:2rem}
.wizard-steps{display:flex;gap:1.5rem;margin-bottom:1rem}
.tabs-nexa .tab-item[aria-selected="true"]{color:var(--primary);border-bottom:2px solid var(--primary)}
#tab_email section:has(> h3:only-child){display:none}

.inbox-note{display:flex;gap:.75rem;padding:.875rem 1rem;border:1px solid #fef08a;border-radius:.5rem;background:var(--bma-surface-2);color:var(--bma-text)}


.plan-table{border-collapse:separate;border-spacing:0;min-width:100%}
.plan-table th,.plan-table td{text-align:center}
.plan-table th:first-child{text-align:left}
.plan-table .plan-current{background:var(--bma-surface-2);color:var(--bma-text)}
.plan-table thead .plan-current{border-radius:12px 12px 0 0}
.plan-table tbody tr:last-child .plan-current{border-radius:0 0 12px 12px}
.plan-current-label{display:block;color:#64748b;font-size:.8rem}
.plan-not-included{color:#64748b}
.plan-check{width:1.1rem;height:1.1rem;color:#1d4ed8}
.plan-table .plan-button{display:block;width:100%;background:var(--bma-primary);color:var(--bma-primary-ink)}
.plan-table .plan-button.hidden{display:none}
.plan-footer{text-align:center;font-size:.875rem}

.dark .plan-table .plan-current{color:var(--bma-text)}

/* Panel controls use the template components with responsive grouping. */
.panel-title{display:flex;align-items:center;gap:.5rem}
.panel-title svg{width:1.5rem;height:1.5rem}
.api-tabs-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem}
.api-tabs-row nav{min-width:0}
.api-tabs-row > a{display:inline-flex;align-items:center;gap:.25rem;white-space:nowrap}
#tab_mcp .mcp-code{display:block;width:100%;box-sizing:border-box;padding-right:6rem}
.account-transfer-group{display:flex}
.account-transfer-group input{flex:1;min-width:0;border-radius:.375rem 0 0 .375rem}
.account-transfer-group button{border-radius:0 .375rem .375rem 0}
.delete-warning{width:3rem;height:3rem;color:#b91c1c}
.delete-actions{display:flex;align-items:center;gap:.5rem}
@media (max-width:639px){
  .api-tabs-row{flex-wrap:wrap}
  .account-transfer-group{flex-direction:column}
  .account-transfer-group input,.account-transfer-group button{border-radius:.375rem}
}

/* Results use the template row and tab components. */
.match-row{padding:1rem;text-align:left}
.match-content{min-width:0;flex:1}
.match-heading{flex-wrap:wrap}
#setup-results-filter .tab-item:has(input:checked){color:var(--primary);border-bottom:2px solid var(--primary)}
#setup-results-filter fieldset{flex-wrap:wrap}
.usage-meter-labels{display:flex;gap:.5rem;align-items:center}
.nexa-app-shell a{text-decoration:none}
.nexa-app-shell a.btn-nexa-outline{color:var(--primary)}
.nexa-app-shell a.btn-nexa-primary{color:var(--primary-ink)}
#setup-results-filter .switch-nexa{width:40px;height:20px;}
#setup-results-filter .switch-nexa .track::before{top:1px;left:1px}

@media (max-width:479px){.nexa-app-shell .card-nexa{padding:16px}.nexa-app-shell .card-nexa .p-5,.nexa-app-shell .card-nexa-body{padding:16px !important}}
