.price-history {
  box-sizing: border-box;
  width: min(1040px, calc(100% - 40px));
  max-height: 94dvh;
  padding: 0;
  border: 1px solid #e3e3e3;
  border-radius: 24px;
  background: #fff;
  color: var(--brand-ink, #191919);
  font: inherit;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 32px 100px #0005;
}
.price-history * {
  box-sizing: border-box;
}
.price-history::backdrop {
  background: rgb(21 21 21 / 0.65);
  backdrop-filter: blur(5px);
}
.price-history .history-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  background: #fff;
  border-bottom: 1px solid #eeeeee;
}
.price-history .history-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #707070;
  margin-bottom: 6px;
}
.price-history h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.7;
}
.price-history button,
.price-history input,
.price-history select {
  font: inherit;
  min-height: 44px;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  padding: 9px 14px;
  background: #fff;
  color: inherit;
  cursor: pointer;
}
.price-history [data-close] {
  flex-shrink: 0;
  font-size: 0.78rem;
  background: #f6f6f6;
  border-color: transparent;
}
.price-history [hidden] {
  display: none !important;
}
.price-history .history-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 18px 28px 0;
}
.history-periods {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f3f3f3;
  border-radius: 13px;
}
.price-history .history-periods button {
  border: 0;
  background: transparent;
  min-height: 38px;
  padding: 7px 18px;
  font-size: 0.82rem;
  color: #797979;
}
.price-history .history-periods [aria-pressed='true'] {
  background: #191919;
  color: white;
  box-shadow: 0 2px 5px #0002;
}
.history-controls label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
}
.history-controls input {
  direction: ltr;
  max-width: 100%;
}
.price-history [data-apply] {
  background: var(--brand-red, #d7182a);
  color: white;
  border: 0;
}
.price-history .history-content {
  padding: 0 28px 20px;
}
.price-history p {
  margin: 10px 0;
  line-height: 1.8;
}
.price-history .history-status {
  margin: 0;
  padding: 12px 28px 0;
  color: #797979;
  font-size: 0.82rem;
}
.price-history .history-status:empty {
  display: none;
}
.price-history .history-product-meta {
  margin: 16px 0 0;
  font-size: 0.76rem;
  color: #707070;
}
.history-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 0 22px;
}
.history-label {
  display: block;
  font-size: 0.75rem;
  color: #7a7a7a;
}
.history-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 4px;
}
.history-price strong {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.history-price > span {
  font-size: 0.8rem;
  color: #858585;
}
.price-history .history-timestamp {
  font-size: 0.7rem;
  color: #707070;
  margin: 0;
}
.history-change {
  display: grid;
  gap: 5px;
  text-align: left;
  border-right: 1px solid #eaeaea;
  padding-right: 24px;
}
.history-change > strong {
  font-size: 1.65rem;
  direction: ltr;
  unicode-bidi: isolate;
  color: #3d3d3d;
}
.history-change.is-up > strong {
  color: var(--brand-red, #d7182a);
}
.history-change.is-down > strong {
  color: #636363;
}
.history-change > span:last-child {
  font-size: 0.72rem;
  color: #797979;
}
.price-history .history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 20px;
  padding: 16px 0;
  border-top: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
}
.history-summary > div {
  padding: 0 18px;
  border-left: 1px solid #eeeeee;
}
.history-summary > div:first-child {
  padding-right: 0;
}
.history-summary > div:last-child {
  border: 0;
}
.history-summary dt {
  font-size: 0.72rem;
  color: #707070;
}
.history-summary dd {
  margin: 7px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
}
.history-stage {
  padding: 18px 20px 10px;
  background: #fbfbfb;
  border: 1px solid #eeeeee;
  border-radius: 16px;
}
.history-chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.history-chart-heading h3 {
  font-size: 0.82rem;
  margin: 0;
  font-weight: 700;
}
.history-chart-heading span {
  font-size: 0.68rem;
  color: #707070;
}
.history-chart {
  display: block;
  width: 100%;
  height: auto;
  direction: ltr;
  touch-action: pan-y;
  overflow: visible;
}
.history-chart text {
  font-family: inherit;
  font-size: 11px;
  fill: #707070;
}
.history-chart circle {
  cursor: crosshair;
}
.history-chart circle:focus {
  outline: 2px solid #191919;
}
.price-history .history-tip {
  font-size: 0.75rem;
  min-height: 28px;
  margin: 5px 0 0;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  color: #474747;
}
.price-history .history-note {
  font-size: 0.67rem;
  color: #767676;
  margin: 10px 0 0;
}
.history-table-wrap {
  max-height: 260px;
  overflow: auto;
}
.history-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.history-content th,
.history-content td {
  text-align: right;
  padding: 12px;
  border-bottom: 1px solid #eeeeee;
}
.history-content details {
  border-bottom: 1px solid #eeeeee;
  margin-top: 8px;
}
.history-content summary {
  cursor: pointer;
  font-size: 0.78rem;
  padding: 16px 0;
  color: #656565;
}
.history-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: #fbfbfb;
  border-top: 1px solid #eeeeee;
}
.history-footer > span {
  font-size: 0.72rem;
  color: #707070;
}
.history-inquiry {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--brand-red, #d7182a);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.history-empty {
  text-align: center;
  margin-top: 18px;
  padding: 36px 20px;
  background: #fbfbfb;
  border: 1px dashed #e2e2e2;
  border-radius: 16px;
}
.history-empty > span {
  font-size: 36px;
  color: #b1b1b1;
}
.history-empty h3 {
  font-size: 1rem;
  margin: 12px 0 0;
}
.history-empty p {
  font-size: 0.8rem;
  color: #707070;
}
.price-history [data-retry] {
  margin: 12px 28px;
}
[data-price-history] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
  font-size: 0.78rem !important;
  min-height: 40px;
  border: 1px solid #dadada;
  border-radius: 9px;
  padding: 7px 12px;
  background: #f9f9f9;
  color: var(--brand-red, #d7182a);
}
[data-price-history]::before {
  content: '';
  display: block;
  width: 20px;
  height: 17px;
  background: currentColor;
  clip-path: polygon(
    0 90%,
    0 60%,
    25% 35%,
    48% 58%,
    85% 8%,
    75% 8%,
    75% 0,
    100% 0,
    100% 25%,
    92% 25%,
    92% 16%,
    49% 78%,
    25% 53%,
    0 80%
  );
}
[data-price-history]:hover {
  background: #ededed;
}
.price-history :focus-visible,
[data-price-history]:focus-visible {
  outline: 3px solid var(--brand-red, #d7182a);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .price-history {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .price-history .history-header {
    padding: 16px;
  }
  .price-history h2 {
    font-size: 0.95rem;
  }
  .price-history .history-eyebrow {
    font-size: 9px;
  }
  .price-history .history-controls {
    padding: 14px 16px 0;
  }
  .price-history .history-content {
    padding: 0 16px 16px;
  }
  .history-periods {
    width: 100%;
    justify-content: space-between;
  }
  .price-history .history-periods button {
    padding: 6px 9px;
    font-size: 0.74rem;
    flex: 1;
  }
  .history-hero {
    gap: 12px;
    padding-bottom: 16px;
  }
  .history-price {
    display: block;
  }
  .history-price strong {
    font-size: 2rem;
    display: block;
  }
  .history-price > span {
    font-size: 0.7rem;
  }
  .history-change {
    padding-right: 12px;
  }
  .history-change > strong {
    font-size: 1.2rem;
  }
  .history-change .history-label {
    font-size: 0.65rem;
  }
  .price-history .history-timestamp {
    font-size: 0.62rem;
  }
  .price-history .history-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px 0;
  }
  .history-summary > div {
    padding: 0 !important;
    border: 0;
  }
  .history-summary dt {
    font-size: 0.65rem;
  }
  .history-summary dd {
    font-size: 0.78rem;
  }
  .history-stage {
    padding: 14px 10px 8px;
  }
  .history-footer {
    padding: 14px 16px;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
  .history-inquiry {
    justify-content: space-between;
  }
  .history-footer > span {
    font-size: 0.68rem;
  }
  .price-history .history-status {
    padding: 12px 16px 0;
  }
  .history-controls label {
    flex: 1;
    min-width: 120px;
  }
  .history-controls input {
    width: 100%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .price-history[open] {
    animation: history-enter 0.22s ease-out;
  }
  @keyframes history-enter {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
/* Give the price path space and keep secondary data below it. */
body .price-history {
  width: min(1120px, calc(100% - 40px));
  border-radius: 20px;
}
body .price-history .history-header {
  padding: 20px 32px;
  background: #fff;
}
body .price-history .history-eyebrow {
  color: #a3263c;
  letter-spacing: 0;
}
body .price-history .history-controls {
  padding: 18px 32px 0;
}
body .price-history .history-periods {
  gap: 3px;
  background: #f3f4f6;
  border: 1px solid #eceef1;
  border-radius: 10px;
  flex-wrap: wrap;
}
body .price-history .history-periods button {
  padding: 7px 16px;
  border-radius: 7px;
}
body .price-history .history-periods [aria-pressed='true'] {
  background: #252a33;
  box-shadow: 0 2px 5px #19202b24;
}
body .price-history .history-content {
  padding: 0 32px 24px;
}
body .price-history .history-hero {
  padding: 14px 0 22px;
}
body .price-history .history-price strong {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #202630;
  letter-spacing: -0.025em;
}
body .price-history .history-change {
  border: 0;
  background: #f7f8fa;
  padding: 14px 20px;
  border-radius: 12px;
  text-align: right;
  min-width: 185px;
}
body .price-history .history-change.is-up > strong {
  color: #bd2039;
}
body .price-history .history-change.is-down > strong {
  color: #087c50;
}
body .price-history .history-stage {
  position: relative;
  padding: 24px 22px 16px;
  background: linear-gradient(180deg, #fff, #fafbfc);
  border: 1px solid #e2e6eb;
  border-radius: 14px;
  box-shadow: 0 5px 24px #16233805;
}
body .price-history .history-chart-heading {
  margin-bottom: 18px;
  align-items: center;
}
body .price-history .history-chart-heading h3 {
  font-size: 14px;
  margin: 5px 0 0;
  color: #252d39;
}
body .price-history .history-chart-kicker {
  font-size: 9px;
  color: #87909e;
  letter-spacing: 0.12em;
  direction: ltr;
  display: block;
  text-align: right;
}
body .price-history .history-readout {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 35px;
  padding: 0 2px 8px;
  border-bottom: 1px solid #f0f1f4;
}
body .price-history .history-readout strong {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  color: var(--history-line);
}
body .price-history .history-readout span {
  font-size: 11px;
  color: #7b8491;
}
body .price-history .history-chart {
  overflow: hidden;
  cursor: crosshair;
}
body .price-history .history-chart text {
  font-size: 12px;
  fill: #7c8592;
  font-variant-numeric: tabular-nums;
}
body .price-history .history-chart:focus-visible {
  outline: 2px solid var(--history-line);
  outline-offset: 4px;
  border-radius: 6px;
}
body .price-history .history-tip {
  background: transparent;
  border: 0;
  border-top: 1px solid #e9edf1;
  border-radius: 0;
  padding: 10px 0 0;
  margin: 0;
  min-height: 32px;
  font-size: 11px;
  color: #68717e;
}
body .price-history .history-summary {
  gap: 12px;
  border: 0;
  margin: 18px 0 0;
  padding: 0;
}
body .price-history .history-summary > div {
  padding: 14px !important;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  background: #fafbfc;
}
body .price-history .history-summary dd {
  font-size: 13px;
  color: #343d49;
}
body .price-history .history-summary dt {
  font-size: 11px;
  color: #7b8491;
}
@media (max-width: 600px) {
  body .price-history {
    width: 100%;
    border-radius: 0;
  }
  body .price-history .history-header {
    padding: 16px;
  }
  body .price-history .history-controls {
    padding: 14px 16px 0;
  }
  body .price-history .history-content {
    padding: 0 16px 18px;
  }
  body .price-history .history-periods {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  body .price-history .history-periods button {
    padding: 7px 4px;
    white-space: nowrap;
    font-size: 11px;
  }
  body .price-history .history-stage {
    padding: 16px 10px 10px;
  }
  body .price-history .history-chart-heading h3 {
    font-size: 12px;
  }
  body .price-history .history-readout {
    gap: 10px;
  }
  body .price-history .history-readout strong {
    font-size: 18px;
  }
  body .price-history .history-change {
    min-width: 0;
    padding: 10px 12px;
  }
  body .price-history .history-summary {
    gap: 8px;
  }
  body .price-history .history-summary > div {
    padding: 12px !important;
  }
}
