/* Public responsive and theme consistency layer. No admin selectors. */
html,body{max-width:100%;overflow-x:hidden}body{-webkit-text-size-adjust:100%;text-size-adjust:100%}img,svg,video,canvas{max-width:100%}.amm-main,.amm-sidebar,.amm-card,.table-responsive{min-width:0}

/* Navigation: readable in both themes. */
.amm-topbar{background:rgba(245,247,251,.95)}
.amm-topbar .navbar-brand,.amm-topbar .navbar .nav-link{color:#29385f}
.amm-topbar .navbar .nav-link:hover,.amm-topbar .navbar .nav-link:focus{color:#5947ba}
.amm-topbar .navbar .nav-link.active{color:#007e91}
.amm-topbar .navbar-toggler{width:44px;height:40px;padding:7px;border:1px solid #8b80c7;background:#e8e4f8;box-shadow:none}
.amm-topbar .navbar-toggler:focus{border-color:#5c4cc0;box-shadow:0 0 0 3px rgba(92,76,192,.14)}
.amm-topbar .navbar-toggler-icon{display:block;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:24px 24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%233b327d' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.3' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}
html[data-theme="dark"] .amm-topbar{background:rgba(15,20,36,.96)}
html[data-theme="dark"] .amm-topbar .navbar-brand,html[data-theme="dark"] .amm-topbar .navbar .nav-link{color:#aebcdf}
html[data-theme="dark"] .amm-topbar .navbar .nav-link:hover,html[data-theme="dark"] .amm-topbar .navbar .nav-link:focus{color:#83d9e4}
html[data-theme="dark"] .amm-topbar .navbar .nav-link.active{color:#55d3df}
html[data-theme="dark"] .amm-topbar .navbar-toggler{border-color:#4e5880;background:#202640}
html[data-theme="dark"] .amm-topbar .navbar-toggler:focus{border-color:#4fc5d1;box-shadow:0 0 0 3px rgba(79,197,209,.14)}
html[data-theme="dark"] .amm-topbar .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%237fd6df' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.3' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}

/* Controls and form contrast. */
.btn-outline-light{border-color:#7466b8;color:#40377e}.btn-outline-light:hover,.btn-outline-light:focus{border-color:#5d4db7;color:#2c245f;background:#e5e0f6}
.btn-outline-secondary{border-color:#7c87a5;color:#3e4b6c}.btn-outline-secondary:hover,.btn-outline-secondary:focus{border-color:#626f91;color:#263451;background:#e5e8f0}
html[data-theme="dark"] .btn-outline-light{border-color:#56628d;color:#aebcdf}html[data-theme="dark"] .btn-outline-light:hover,html[data-theme="dark"] .btn-outline-light:focus{border-color:#55c9d5;color:#8fe0ea;background:#252b49}
html[data-theme="dark"] .btn-outline-secondary{border-color:#4f5a80;color:#9eacd0}html[data-theme="dark"] .btn-outline-secondary:hover,html[data-theme="dark"] .btn-outline-secondary:focus{border-color:#68759e;color:#92dbe4;background:#242a46}
.form-control::placeholder{color:#7a849c;opacity:1}html[data-theme="dark"] .form-control::placeholder{color:#7f8bac;opacity:1}
.dropdown-menu{--bs-dropdown-link-disabled-color:var(--muted)}

/* Lists and theme-specific component text. */
.amm-table{--bs-table-color:#344261}.amm-table thead th{color:#394977}.amm-table tbody a{color:#007f91}.amm-pool-head-tvl,.amm-my-lp-assets b{color:#33415f}.amm-hero-copy p{color:#43516d}
.amm-vote-candidates-page button.amm-candidate-pay-card{border-color:#cbc5e5!important;background:#f1eff9!important;color:#33415f!important}.amm-vote-candidates-page button.amm-candidate-pay-card:hover:not(:disabled){border-color:#8172c9!important;background:#e9e5f7!important}.amm-vote-candidates-page button.amm-candidate-pay-card.is-selected{border-color:#8b75c9!important;background:linear-gradient(145deg,#e5dff8,#dff2f4)!important}.amm-vote-candidates-page .amm-candidate-pay-main b{color:#536180}.amm-vote-candidates-page .amm-candidate-pay-meta{color:#65718d;border-color:#d6d0e9}
html[data-theme="dark"] .amm-table{--bs-table-color:#aebcdf}html[data-theme="dark"] .amm-table thead th{color:#8fd8e2}html[data-theme="dark"] .amm-table tbody a{color:#55d3df}html[data-theme="dark"] .amm-pool-head-tvl,html[data-theme="dark"] .amm-my-lp-assets b{color:#a9c0df}html[data-theme="dark"] .amm-hero-copy p{color:#b2c1df}
html[data-theme="dark"] .amm-vote-candidates-page button.amm-candidate-pay-card{border-color:#3f486d!important;background:#181d31!important;color:#aebcdf!important}html[data-theme="dark"] .amm-vote-candidates-page button.amm-candidate-pay-card:hover:not(:disabled){border-color:#56bdca!important;background:#222941!important}html[data-theme="dark"] .amm-vote-candidates-page button.amm-candidate-pay-card.is-selected{border-color:#9b82d8!important;background:linear-gradient(145deg,#2c274b,#193c47)!important}html[data-theme="dark"] .amm-vote-candidates-page .amm-candidate-pay-main b{color:#9eacd0}html[data-theme="dark"] .amm-vote-candidates-page .amm-candidate-pay-meta{color:#8f9bbd;border-color:#343d60}

/* Content width, long identifiers, tables and dialogs. */
.amm-shell{width:100%;max-width:1920px;margin-inline:auto}.amm-card{overflow-wrap:anywhere}.amm-card h1,.amm-card h2,.amm-card h3,.amm-card h4,.amm-card h5{word-break:normal;overflow-wrap:anywhere}
.table-responsive{width:100%;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.table-responsive>.table{margin-bottom:0}.amm-table th,.amm-table td{max-width:360px}.amm-table code,.amm-table a,.amm-code,code{overflow-wrap:anywhere;word-break:break-word}
.modal-dialog{width:auto;max-width:min(var(--bs-modal-width,500px),calc(100vw - 24px));margin-inline:auto}.modal-content{max-height:calc(100dvh - 24px);overflow:auto}.amm-copy-field,.amm-copy-field textarea{max-width:100%}.amm-qr-box img{height:auto;aspect-ratio:1/1}

/* Tablet. */
@media(max-width:991.98px){
  .amm-topbar .navbar{padding:.55rem .75rem}.amm-topbar .navbar-collapse{margin-top:.65rem;padding:.7rem;border:1px solid var(--line);border-radius:14px;background:var(--panel);box-shadow:0 14px 34px rgba(16,24,40,.16)}
  .amm-topbar .navbar-nav{gap:.15rem}.amm-topbar .navbar .nav-link{padding:.62rem .72rem;border-radius:9px}.amm-topbar .navbar .nav-link:hover,.amm-topbar .navbar .nav-link:focus{background:#e9e5f7}.amm-topbar .navbar .nav-link.active{background:#dff3f5}
  html[data-theme="dark"] .amm-topbar .navbar-collapse{background:#151a2d;box-shadow:0 18px 38px rgba(0,0,0,.38)}html[data-theme="dark"] .amm-topbar .navbar .nav-link:hover,html[data-theme="dark"] .amm-topbar .navbar .nav-link:focus{background:#232942}html[data-theme="dark"] .amm-topbar .navbar .nav-link.active{background:#1d3541}
  .amm-nav-actions{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;width:100%;margin-top:.65rem}.amm-nav-actions .amm-language-dropdown{min-width:0;margin-top:0}.amm-nav-actions .amm-language-button{width:100%}
  .amm-shell{padding:12px}.amm-sidebar{margin-top:0}.amm-sidebar .amm-card{height:auto!important}.amm-footer{padding:14px 12px;font-size:.78rem}
  .amm-home-main-grid>.col-lg-6{width:100%}.amm-home-panel{height:auto!important}
  .amm-orbit-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Phones. */
@media(max-width:575.98px){
  .amm-topbar .navbar{padding:.48rem .68rem}.amm-logo{font-size:1.35rem}.amm-topbar .navbar-collapse{padding:.55rem}.amm-nav-actions{grid-template-columns:1fr;gap:.5rem!important}.amm-nav-actions>.btn,.amm-nav-actions .amm-language-dropdown{width:100%}.amm-nav-actions .amm-language-menu{position:static!important;transform:none!important;margin-top:.4rem;width:100%}
  .amm-shell{padding:8px}.amm-shell>.row{--bs-gutter-x:.6rem;--bs-gutter-y:.6rem}.amm-card{border-radius:17px}.amm-card.p-4{padding:1rem!important}.amm-card.p-3{padding:.85rem!important}
  .amm-card h1{font-size:clamp(2rem,13vw,3.2rem);line-height:1.02}.amm-card h2{font-size:1.55rem}.amm-card h3{font-size:1.3rem}.amm-card h4{font-size:1.18rem}.amm-hero-copy p{font-size:.93rem;line-height:1.55}
  .amm-home-orbit-nav{max-width:86vw}.amm-home-panel h4{margin-bottom:.75rem}.amm-home-rewards-table th,.amm-home-rewards-table td{padding:.55rem .35rem}.amm-home-reward-list{gap:5px 8px}.amm-home-reward-token{font-size:.82rem}
  .amm-home-vote-table{min-width:440px}.amm-vote-table{min-width:640px}.amm-table th,.amm-table td{font-size:.82rem;padding:.5rem .42rem}.amm-table .amm-sub{max-width:150px}
  .amm-vote-actions{justify-content:flex-start}.amm-vote-btn{width:40px;height:40px}.amm-home-panel-head{align-items:flex-start;gap:.6rem}.amm-home-panel-head .btn{white-space:normal}
  .amm-metric{padding:14px}.amm-metric strong{font-size:1.2rem}.amm-empty{padding:16px}.amm-orbit-stats{grid-template-columns:1fr}
  .row>.col-md-2.text-center.fs-3{padding-top:.25rem!important;padding-bottom:.25rem;transform:rotate(90deg)}
  .d-flex.gap-2:not(.amm-nav-actions){flex-wrap:wrap}.d-flex.gap-2:not(.amm-nav-actions)>.btn{white-space:normal}
  .modal-dialog{max-width:calc(100vw - 12px);margin:.4rem auto}.modal-content{max-height:calc(100dvh - .8rem);border-radius:16px}.modal-header,.modal-body,.modal-footer{padding:.85rem}.modal-footer{gap:.45rem}.modal-footer .btn{flex:1 1 auto}
  .amm-qr-box{padding:10px}.amm-qr-box img{width:min(220px,72vw)}
  .amm-pool-actions,.amm-my-lp-actions{grid-template-columns:1fr}.amm-pool-actions .btn,.amm-my-lp-actions .btn{width:100%}
  .amm-sidebar a{padding:10px 0}.amm-footer{font-size:.72rem;line-height:1.45}
}

/* Very small phones and landscape-height safety. */
@media(max-width:359.98px){.amm-logo{font-size:1.18rem}.amm-topbar .navbar{padding-inline:.5rem}.amm-card.p-3,.amm-card.p-4{padding:.72rem!important}.amm-home-orbit-nav{max-width:90vw}.amm-table th,.amm-table td{font-size:.76rem}}
@media(max-height:520px) and (orientation:landscape){.modal-content{max-height:calc(100dvh - 8px)}.modal-dialog{margin:4px auto}.amm-topbar{position:relative}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
