/* Cargar después de /_shell/tokens/v1/tokens.css. */
.at-figure {
  min-width: 0;
  max-width: 100%;
  margin-block: var(--autotia-space-8);
}

.at-figure figcaption {
  display: block;
}

.at-figure-title {
  display: block;
  color: var(--autotia-text-primary);
  font-size: var(--autotia-font-size-lg);
  font-weight: var(--autotia-font-weight-bold);
  line-height: var(--autotia-line-height-lg);
}

.at-figure-ref {
  display: block;
  margin-top: var(--autotia-space-1);
  color: var(--autotia-text-secondary);
  font-size: var(--autotia-font-size-sm);
  line-height: var(--autotia-line-height-sm);
}

.at-table-wrap {
  min-width: 0;
  max-width: 100%;
  margin-top: var(--autotia-space-4);
  overflow-x: auto;
  border: var(--autotia-border-width) solid var(--autotia-border-subtle);
  border-radius: var(--autotia-radius-lg);
  background: var(--autotia-surface);
}

.at-table-wrap:focus-visible {
  outline: var(--autotia-focus-ring-width) solid var(--autotia-focus-ring);
  outline-offset: var(--autotia-focus-ring-offset);
}

.at-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--autotia-text-primary);
  font-size: var(--autotia-font-size-sm);
  line-height: var(--autotia-line-height-sm);
  font-variant-numeric: tabular-nums;
}

.at-table thead th {
  padding: var(--autotia-space-3) var(--autotia-space-4);
  border-bottom: var(--autotia-border-width) solid var(--autotia-border);
  background: var(--autotia-surface-sunken);
  color: var(--autotia-text-secondary);
  font-size: var(--autotia-font-size-xs);
  font-weight: var(--autotia-font-weight-semibold);
  text-align: left;
  vertical-align: bottom;
}

.at-table tbody th,
.at-table td {
  padding: var(--autotia-space-4);
  border-bottom: var(--autotia-border-width) solid var(--autotia-border-subtle);
  text-align: left;
  vertical-align: top;
}

.at-table tbody th[scope="row"] {
  font-weight: var(--autotia-font-weight-semibold);
  color: var(--autotia-text-primary);
}

.at-table tbody tr:last-child th,
.at-table tbody tr:last-child td {
  border-bottom: 0;
}

.at-table .at-num {
  text-align: right;
  white-space: nowrap;
}

.at-value {
  display: block;
}

.at-table thead th.at-num {
  text-align: right;
}

.at-sub {
  display: block;
  color: var(--autotia-text-muted);
  font-size: var(--autotia-font-size-xs);
  font-weight: var(--autotia-font-weight-medium);
  line-height: var(--autotia-line-height-xs);
}

.at-desc {
  display: block;
  color: var(--autotia-text-secondary);
  font-weight: var(--autotia-font-weight-regular);
}

.at-chip {
  display: inline-block;
  padding: var(--autotia-space-0-5) var(--autotia-space-2);
  border-radius: var(--autotia-radius-full);
  background: var(--autotia-neutral-100);
  color: var(--autotia-neutral-700);
  font-size: var(--autotia-font-size-xs);
  font-weight: var(--autotia-font-weight-semibold);
  line-height: var(--autotia-line-height-xs);
  white-space: nowrap;
}

.at-chip--highlight {
  background: var(--autotia-highlight-subtle);
  color: var(--autotia-highlight);
}

.at-range {
  position: relative;
  display: block;
  height: var(--autotia-range-height);
  margin-top: var(--autotia-space-2);
  overflow: hidden;
  border-radius: var(--autotia-radius-full);
  background: var(--autotia-neutral-200);
}

.at-range-fill {
  position: absolute;
  top: 0;
  left: calc(var(--at-from) * 1%);
  width: calc((var(--at-to) - var(--at-from)) * 1%);
  height: 100%;
  border-radius: var(--autotia-radius-full);
  background: var(--autotia-primary);
}

.at-range-fill--open {
  border-radius: var(--autotia-radius-full) 0 0 var(--autotia-radius-full);
  background: linear-gradient(to right, var(--autotia-primary), transparent);
}

.at-note {
  margin-block: var(--autotia-space-3) 0;
  color: var(--autotia-text-secondary);
  font-size: var(--autotia-font-size-sm);
  line-height: var(--autotia-line-height-sm);
}

.at-note strong {
  color: var(--autotia-text-primary);
}

.at-table--scroll th:first-child,
.at-table--scroll td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--autotia-surface);
}

.at-table--scroll thead th:first-child {
  z-index: 2;
  background: var(--autotia-surface-sunken);
}

@media (max-width: 680px) {
  .at-table:not(.at-table--scroll),
  .at-table:not(.at-table--scroll) tbody,
  .at-table:not(.at-table--scroll) tr,
  .at-table:not(.at-table--scroll) th,
  .at-table:not(.at-table--scroll) td {
    display: block;
  }

  .at-table:not(.at-table--scroll) thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
  }

  .at-table-wrap:has(.at-table:not(.at-table--scroll)) {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .at-table:not(.at-table--scroll) tbody {
    display: flex;
    flex-direction: column;
    gap: var(--autotia-space-3);
  }

  .at-table:not(.at-table--scroll) tbody tr {
    overflow: hidden;
    border: var(--autotia-border-width) solid var(--autotia-border-subtle);
    border-radius: var(--autotia-radius-lg);
    background: var(--autotia-surface);
  }

  .at-table:not(.at-table--scroll) tbody th[scope="row"] {
    padding: var(--autotia-space-3) var(--autotia-space-4);
    border-bottom: var(--autotia-border-width) solid var(--autotia-border-subtle);
    background: var(--autotia-surface-sunken);
    font-size: var(--autotia-font-size-md);
    font-weight: var(--autotia-font-weight-bold);
    line-height: var(--autotia-line-height-md);
  }

  .at-table:not(.at-table--scroll) tbody td {
    display: flex;
    justify-content: space-between;
    gap: var(--autotia-space-3);
    padding: var(--autotia-space-3) var(--autotia-space-4);
    text-align: right;
  }

  .at-table:not(.at-table--scroll) tbody td::before {
    flex: 0 0 auto;
    max-width: 45%;
    color: var(--autotia-text-secondary);
    content: attr(data-label);
    font-size: var(--autotia-font-size-xs);
    font-weight: var(--autotia-font-weight-semibold);
    line-height: var(--autotia-line-height-xs);
    text-align: left;
  }

  .at-table:not(.at-table--scroll) tbody td.at-num {
    text-align: right;
    white-space: normal;
  }

  .at-table:not(.at-table--scroll) tbody td .at-value {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .at-table:not(.at-table--scroll) tbody td.at-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .at-table:not(.at-table--scroll) tbody td.at-stack .at-value {
    width: 100%;
    text-align: left;
  }

  .at-table:not(.at-table--scroll) tbody td.at-stack::before {
    max-width: none;
  }

  .at-table:not(.at-table--scroll) tbody td.at-stack .at-value .at-range {
    width: 100%;
  }

  .at-table:not(.at-table--scroll) tbody td.at-total {
    background: var(--autotia-surface-sunken);
    font-size: var(--autotia-font-size-lg);
    font-weight: var(--autotia-font-weight-bold);
  }

  .at-table:not(.at-table--scroll) tbody tr:last-child td {
    border-bottom: 0;
  }
}
