/* Full chart tools around TradingView Advanced Charts: the multi-chart grid,
   bar replay controls, alert dialog, layout menu and alert notices.
   Toolbar buttons inside the chart iframe are styled in chart-legend.css. */

.ac-grid {
  display: grid;
  position: relative;
}

.ac-grid.ac-multi {
  gap: 2px;
  background: var(--border);
}

.ac-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
}

.ac-cell[hidden] {
  display: none;
}

.ac-cell-chart {
  position: absolute;
  inset: 0;
}

.ac-cell-chart iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.ac-multi .ac-cell.is-active::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid var(--accent);
  pointer-events: none;
}

.ac-xh,
.ac-rp {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.ac-xh[hidden],
.ac-rp[hidden],
.ac-xh [hidden] {
  display: none;
}

.ac-xh-v,
.ac-xh-h,
.ac-rp-line,
.ac-rp-shade {
  position: absolute;
}

.ac-xh-v {
  width: 0;
  border-left: 1px dashed #9598a1;
}

.ac-xh-h {
  height: 0;
  border-top: 1px dashed #9598a1;
}

.ac-xh-time,
.ac-xh-price,
.ac-rp-tag {
  position: absolute;
  padding: 3px 7px;
  border-radius: 3px;
  background: #131722;
  color: #ffffff;
  font: 500 12px/1.3 var(--font);
  white-space: nowrap;
}

.ac-xh-price {
  padding: 2px 5px;
}

.ac-rp-line {
  width: 2px;
  background: #2962ff;
}

.ac-rp-shade {
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.ac-rp-tag {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 0;
  background: #2962ff;
  font: 14px/1 -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
}

/* Upgrade, pinned to the chart area's top-right corner (over the header). */
.ac-upgrade {
  position: absolute;
  top: 3px;
  right: 6px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 16px 0 13px;
  border: 0;
  border-radius: 999px;
  background: #131722;
  color: #ffffff;
  font: 400 15px/1 -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease;
  animation: ac-upgrade-pulse 60s ease-out 4s infinite;
}

/* One soft pulse a minute. */
@keyframes ac-upgrade-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(41, 98, 255, 0.55);
  }
  2.5% {
    box-shadow: 0 0 0 10px rgba(41, 98, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(41, 98, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-upgrade {
    animation: none;
  }
}

.ac-upgrade svg {
  width: 16px;
  height: 16px;
}

.ac-upgrade:hover {
  background: #2a2e39;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .ac-upgrade {
    background: #f0f3fa;
    color: #0f0f0f;
  }

  :root:not([data-theme='light']) .ac-upgrade:hover {
    background: #ffffff;
  }
}

:root[data-theme='dark'] .ac-upgrade {
  background: #f0f3fa;
  color: #0f0f0f;
}

:root[data-theme='dark'] .ac-upgrade:hover {
  background: #ffffff;
}

.ac-upgrade:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

/* Bar replay: a strip under the chart (the chart shrinks to make room), a
   faint "Replay" mark behind the bars, and the start marker's cut animation. */
.ac-replay {
  position: absolute;
  left: 50%;
  bottom: 48px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 16px);
  padding: 5px 6px;
  overflow-x: auto;
  transform: translateX(-50%);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font: 14px/1.2 -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
  white-space: nowrap;
}

.ac-replay-select,
.ac-replay-icon,
.ac-replay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ac-replay-icon {
  width: 36px;
  padding: 0;
}

.ac-replay-select.is-on,
.ac-replay-select:hover,
.ac-replay-icon:hover:not(:disabled),
.ac-replay-btn:hover {
  background: var(--surface-muted);
}

.ac-replay-icon:disabled {
  opacity: 0.35;
  cursor: default;
}

.ac-replay-btn {
  background: var(--surface-muted);
}

.ac-replay svg {
  flex: 0 0 auto;
}

.ac-replay-select:focus-visible,
.ac-replay-icon:focus-visible,
.ac-replay-btn:focus-visible,
.ac-replay-speed:focus-visible,
.ac-replay-date-input:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.ac-replay-pick {
  display: inline-flex;
  gap: 4px;
}

.ac-replay-pick[hidden] {
  display: none;
}

.ac-replay-speed,
.ac-replay-date-input {
  height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  color-scheme: light dark;
  cursor: pointer;
}

.ac-replay-date-input {
  border: 1px solid var(--border);
  font-size: 13px;
}

.ac-replay-res {
  min-width: 18px;
  text-align: center;
}

.ac-replay-label {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ac-replay-sep {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--border);
}

.ac-rp-mark {
  position: absolute;
  inset: 0 64px 90px 56px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  opacity: 0.04;
  font: 500 56px/1 -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
  pointer-events: none;
}

.ac-rp-mark[hidden] {
  display: none;
}

.ac-rp-shade {
  transition: background-color 0.2s ease;
}

.ac-rp.is-cutting .ac-rp-shade {
  background: var(--surface);
}

.ac-rp {
  transition: opacity 0.25s ease;
}

.ac-rp.is-fading {
  opacity: 0;
}

/* Dialogs */
.ac-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-family: var(--font);
}

.ac-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.ac-dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 34px);
}

.ac-dialog-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 14px 12px 20px;
  border-bottom: 1px solid var(--hairline);
}

.ac-dialog-head h2 {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

.ac-alert-symbol {
  width: 0;
  flex: 1;
  min-width: 80px;
  max-width: 160px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  font: 700 var(--text-lg) var(--font);
  text-transform: uppercase;
}

.ac-dialog-body {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
  overflow-y: auto;
}

.ac-dialog-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.ac-field-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.ac-field-label {
  color: var(--muted);
  font-size: var(--text-sm);
}

.ac-field-row:first-child {
  align-items: start;
}

.ac-field-row:first-child .ac-field-label {
  padding-top: 9px;
}

.ac-field-stack {
  display: grid;
  gap: 8px;
}

.ac-field-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.ac-dialog select,
.ac-dialog input:not([type='checkbox']),
.ac-dialog textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: var(--text-base) var(--font);
  color-scheme: light dark;
}

.ac-dialog textarea {
  resize: vertical;
}

.ac-dialog select:disabled {
  opacity: 1;
  background: var(--surface-soft);
  color: var(--text);
}

.ac-dialog select:focus,
.ac-dialog input:focus,
.ac-dialog textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: var(--ring);
}

.ac-field-note {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.ac-divider {
  height: 1px;
  background: var(--hairline);
}

.ac-alert-error {
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--negative-soft);
  color: var(--negative-text);
  font-size: var(--text-sm);
}

.ac-alert-error[hidden] {
  display: none;
}

.ac-alert-error a {
  color: inherit;
  font-weight: 700;
}

.ac-alert-quota {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.ac-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--hairline);
}

.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: 700 var(--text-sm) var(--font);
  text-decoration: none;
  cursor: pointer;
}

.ac-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ac-btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.ac-btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.ac-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.ac-btn-small {
  min-height: 32px;
  padding: 0 12px;
}

.ac-btn:focus-visible,
.ac-icon-btn:focus-visible,
.ac-layout-option:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.ac-icon-btn {
  display: inline-grid;
  padding: 0;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ac-icon-btn:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.ac-alert-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 10px 10px;
  border-radius: var(--radius-sm);
}

.ac-alert-item:hover {
  background: var(--surface-soft);
}

.ac-alert-main {
  flex: 1;
  min-width: 0;
}

.ac-alert-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--text-base);
}

.ac-alert-meta {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.ac-badge.is-active {
  background: var(--positive-soft);
  color: var(--positive-text);
}

.ac-badge.is-triggered {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Layout menu */
.ac-popover {
  position: fixed;
  z-index: 1000;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-family: var(--font);
}

.ac-popover[hidden] {
  display: none;
}

.ac-layout-menu {
  width: 340px;
  max-width: calc(100vw - 16px);
  padding: 6px 14px 12px;
}

.ac-layout-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--hairline);
}

.ac-layout-count {
  width: 14px;
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: right;
}

.ac-layout-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ac-layout-option {
  display: grid;
  padding: 0;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.ac-layout-option:hover {
  background: var(--surface-muted);
}

.ac-layout-option.is-current {
  background: var(--text);
  color: var(--surface);
}

.ac-layout-sync {
  padding-top: 12px;
}

.ac-layout-sync-title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ac-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: var(--text-base);
  cursor: pointer;
}

.ac-info {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  vertical-align: 1px;
  cursor: help;
}

.ac-switch {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  appearance: none;
  transition: background 0.15s ease;
}

.ac-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.ac-switch:checked {
  background: var(--accent);
}

.ac-switch:checked::after {
  transform: translateX(16px);
}

.ac-switch:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.ac-layout-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

/* Alert notices */
.ac-toasts {
  position: fixed;
  top: 56px;
  right: 12px;
  z-index: 2000;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.ac-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 8px 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--text);
  font-family: var(--font);
  pointer-events: auto;
  animation: ac-toast-in 0.2s ease-out;
}

.ac-toast-icon {
  color: var(--warning);
  line-height: 0;
}

.ac-toast-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  font-size: var(--text-sm);
}

.ac-toast-text strong {
  font-size: var(--text-base);
  overflow-wrap: anywhere;
}

.ac-toast-text span {
  color: var(--muted);
}

.ac-toast-close {
  display: grid;
  padding: 0;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ac-toast-close:hover {
  background: var(--surface-muted);
  color: var(--text);
}

@keyframes ac-toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-toast {
    animation: none;
  }
}

@media (max-width: 600px) {
  .ac-field-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ac-field-row:first-child .ac-field-label {
    padding-top: 0;
  }

  .ac-replay {
    bottom: 44px;
  }

  .ac-replay-select span,
  .ac-replay-label,
  .ac-rp-mark span {
    display: none;
  }
}

/* Right sidebar: icon rail plus one open panel beside the charts. */
.ac-grid.ac-has-rail {
  padding-right: 52px;
}

.ac-grid.ac-panel-open {
  padding-right: 372px;
}

.ac-has-rail .ac-upgrade {
  right: 58px;
}

.ac-panel-open .ac-upgrade {
  right: 378px;
}

.ac-rail {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 52px;
  padding: 8px 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.ac-rail-fill {
  flex: 1;
}

.ac-rail-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ac-rail-btn:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.ac-rail-btn.is-on {
  background: var(--surface-muted);
  color: var(--text);
}

.ac-rail-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.ac-panel {
  position: absolute;
  top: 0;
  right: 52px;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 320px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 14px/1.35 -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
}

.ac-panel[hidden] {
  display: none;
}

.ac-panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 6px 8px 6px 16px;
  background: var(--surface);
}

.ac-panel-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.ac-panel-actions {
  display: flex;
  align-items: center;
}

.ac-panel-actions a.ac-icon-btn {
  color: var(--muted);
}

.ac-panel-body {
  padding-bottom: 12px;
}

.ac-panel-note {
  margin: 10px 16px;
  color: var(--muted);
  font-size: 13px;
}

.ac-panel-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin: 12px 16px;
  color: var(--muted);
}

.ac-panel-empty p {
  margin: 0;
}

.ac-wl-add {
  display: flex;
  gap: 6px;
  padding: 0 12px 10px 16px;
}

.ac-wl-add[hidden] {
  display: none;
}

.ac-wl-add input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-transform: uppercase;
}

.ac-wl-cols,
.ac-wl-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 6px;
  padding: 0 16px;
}

.ac-wl-cols {
  height: 30px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.ac-wl-cols span:not(:first-child),
.ac-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ac-wl-list,
.ac-plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ac-wl-section {
  padding: 12px 16px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ac-wl-row {
  position: relative;
  height: 40px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}

.ac-wl-row:hover,
.ac-alert-row:hover,
.ac-link-row:hover {
  background: var(--surface-soft);
}

.ac-wl-row:focus-visible,
.ac-alert-row:focus-visible,
.ac-link-row:focus-visible {
  outline: none;
  box-shadow: inset var(--ring);
}

.ac-wl-sym {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 500;
}

.ac-wl-sym > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-wl-remove {
  position: absolute;
  top: 50%;
  right: 4px;
  display: none;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--muted);
  transform: translateY(-50%);
  cursor: pointer;
}

.ac-wl-row:hover .ac-wl-remove,
.ac-wl-remove:focus-visible {
  display: grid;
}

.ac-wl-remove svg {
  width: 14px;
  height: 14px;
}

.ac-sym-logo {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  vertical-align: middle;
}

.ac-wl-sym .ac-sym-logo {
  margin-right: 0;
}

.ac-sym-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.is-up {
  color: var(--positive-text);
}

.is-down {
  color: var(--negative-text);
}

.ac-quote {
  margin-top: auto;
  padding: 16px;
  border-top: 4px solid var(--border);
}

.ac-quote-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.ac-quote-head .ac-btn {
  margin-left: auto;
}

.ac-quote-name,
.ac-quote-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ac-quote-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 12px 0 0;
}

.ac-quote-price span {
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ac-quote-price small {
  color: var(--muted);
}

.ac-quote-price em {
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
}

.ac-quote-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.ac-quote-stats dt {
  color: var(--muted);
  font-size: 12px;
}

.ac-quote-stats dd {
  margin: 2px 0 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ac-pf-stats {
  margin: 4px 16px 12px;
}

.ac-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 0 16px 8px;
  padding: 3px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.ac-seg button {
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.ac-seg button[aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.ac-alert-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 16px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}

.ac-alert-row > span,
.ac-link-row > span {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.ac-alert-row strong,
.ac-link-row strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-alert-row small,
.ac-link-row small {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12.5px;
}

.ac-status {
  margin-left: 4px;
  font-style: normal;
}

.ac-status.is-active {
  color: var(--positive-text);
}

.ac-row-action {
  opacity: 0;
}

.ac-alert-row:hover .ac-row-action,
.ac-row-action:focus-visible {
  opacity: 1;
}

.ac-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  border-bottom: 1px solid var(--hairline);
  color: var(--text);
  text-decoration: none;
}

.ac-link-row small {
  white-space: normal;
}

.ac-badge-pro {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--badge-pro-bg);
  color: var(--badge-pro-text);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.ac-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 8px;
}

.ac-chips button {
  height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font: 13px -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
  cursor: pointer;
}

.ac-chips button[aria-pressed='true'] {
  background: var(--text);
  color: var(--surface);
}

.ac-day {
  margin: 0;
  padding: 10px 16px 6px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 767px) {
  .ac-rail,
  .ac-panel {
    display: none;
  }

  .ac-grid.ac-has-rail,
  .ac-grid.ac-panel-open {
    padding-right: 0;
  }

  .ac-has-rail .ac-upgrade,
  .ac-panel-open .ac-upgrade {
    right: 6px;
  }
}

.ac-layout-row.is-locked .ac-layout-option {
  opacity: 0.4;
}
