/* Modelo de valoración: estilos propios sobre los tokens de styles.css y demo.css. */

.cd-hero-grid > * {
  min-width: 0;
}

.cd-facts .card-figures dd {
  white-space: normal;
}

.vm-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
}

.vm-presets .cd-hint {
  margin: 0 4px 0 0;
}

.ay-chip {
  font: inherit;
  font-size: 0.9375rem;
  padding: 7px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.ay-chip:hover {
  border-color: var(--accent);
}

.ay-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.vm-layout {
  display: grid;
  gap: 24px;
}

@media (min-width: 1100px) {
  .vm-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.vm-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.vm-panel {
  min-width: 0;
}

.vm-panel > summary {
  cursor: pointer;
  margin: 0;
}

.vm-panel[open] > summary {
  margin-bottom: 12px;
}

.vm-side {
  min-width: 0;
  order: -1;
}

@media (min-width: 1100px) {
  .vm-side {
    order: 0;
  }

  .vm-sticky {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}

.vm-summary {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.vm-sum-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

.vm-sum-value {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.1;
}

.vm-sum-rec {
  margin-top: 6px;
  font-weight: 600;
}

.vm-sum-rec.is-buy {
  color: #8ee0c4;
}

.vm-sum-rec.is-sell {
  color: #ffb4a6;
}

.vm-sum-rec.is-hold {
  color: #ffe1a1;
}

.vm-kv--sum {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.vm-kv--sum > div {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.vm-kv--sum dt {
  color: rgba(255, 255, 255, 0.75) !important;
}

.vm-ref {
  margin-top: 14px;
  font-size: 0.8125rem;
  line-height: 1.45;
  opacity: 0.85;
}

.vm-export {
  width: 100%;
  margin-top: 12px;
}

.vm-grid {
  display: grid;
  gap: 12px 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  margin: 8px 0;
}

.vm-field {
  display: grid;
  gap: 5px;
  align-content: start;
  min-width: 0;
  font-size: 0.875rem;
}

.vm-field > span:first-child {
  font-weight: 600;
}

.vm-field small {
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.vm-input {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--surface);
}

.vm-input:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}

.vm-input input,
.vm-input select {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.vm-input input:focus,
.vm-input select:focus {
  outline: none;
}

.vm-input i {
  padding-right: 10px;
  color: var(--ink-3);
  font-style: normal;
}

.vm-check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.9375rem;
  align-self: end;
  padding-bottom: 8px;
}

.vm-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.vm-h4 {
  margin: 18px 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-2);
}

.vm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.vm-table-wrap {
  overflow-x: auto;
  margin: 10px 0;
  -webkit-overflow-scrolling: touch;
}

.vm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.vm-table caption {
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  padding-bottom: 6px;
  color: var(--ink-2);
}

.vm-table th,
.vm-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
  text-align: right;
  white-space: nowrap;
}

.vm-table th[scope="row"],
.vm-table thead th:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
  white-space: normal;
  min-width: 11rem;
}

.vm-table thead th {
  background: var(--tint);
  font-weight: 600;
}

.vm-table tr.is-strong th,
.vm-table tr.is-strong td {
  font-weight: 700;
  color: var(--ink);
}

.vm-table--inputs td {
  padding: 3px;
}

.vm-table--inputs input {
  width: 100%;
  min-width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font: inherit;
  text-align: right;
  background: #f4f8ff;
  color: #1846a3;
}

.vm-table--inputs input:focus-visible {
  outline: 2px solid var(--accent);
}

.vm-table--peers td:first-child input {
  text-align: left;
  min-width: 140px;
}

.vm-x {
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink-2);
}

.vm-table--grid td {
  text-align: center;
}

.vm-table--grid td.is-above {
  color: var(--accent-strong);
}

.vm-table--grid td.is-below {
  color: var(--warn);
}

.vm-table--grid td.is-near {
  background: var(--accent-tint);
}

.vm-table--grid td.is-center {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.vm-two {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .vm-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vm-two--wacc {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
  }
}

.vm-kv {
  display: grid;
  margin: 8px 0;
}

.vm-kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}

.vm-kv dt {
  color: var(--ink-2);
}

.vm-kv dd {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.vm-kv-strong dd,
.vm-kv-strong dt {
  font-weight: 700;
  color: var(--ink);
}

@media (min-width: 760px) {
  .vm-kv--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }
}

.vm-verdict {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 600;
}

.vm-verdict.is-buy {
  background: var(--accent-tint);
  color: var(--accent-strong);
}

.vm-verdict.is-sell {
  background: var(--warn-tint);
  color: var(--warn);
}

.vm-muted {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.vm-ff {
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.ff-grid {
  stroke: var(--rule);
}

.ff-tick,
.ff-val {
  font-size: 11px;
  fill: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.ff-label {
  font-size: 12.5px;
  fill: var(--ink);
}

.ff-bar {
  fill: var(--accent);
  opacity: 0.85;
}

.ff-price {
  stroke: var(--ink);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

.ff-ptxt {
  font-size: 11px;
  fill: var(--ink);
  font-weight: 600;
}

.ff-target {
  stroke: var(--warn);
  stroke-width: 2.5;
}

.vm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.lg-price,
.lg-target {
  display: inline-block;
  width: 22px;
  height: 0;
  border-top: 2px dashed var(--ink);
}

.lg-target {
  border-top: 3px solid var(--warn);
  margin-left: 12px;
}

.cd-message:empty {
  display: none;
}

.vm-stack {
  display: grid;
  gap: 18px;
}
