/* Smart API value section, scoped to the Smart API page. */
.smart-experience .smart-value-section { padding-top: 54px; padding-bottom: 64px; border-bottom: 1px solid #dce5ea; }
.smart-experience .smart-cost-anchor { display: block; height: 0; scroll-margin-top: 100px; }
.smart-experience .smart-cost {
  display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  margin-top: 34px; border: 1px solid #d6e0e7; border-radius: 16px; overflow: hidden;
  background: #fff; box-shadow: 0 16px 54px -42px #1b4c64;
}
.smart-experience .cost-controls { min-width: 0; padding: 34px; background: #f3f7fb; }
.smart-experience .cost-control + .cost-control { margin-top: 25px; }
.smart-experience .cost-control-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.smart-experience .cost-control-heading label { font-size: 14px; color: #30475d; }
.smart-experience .cost-number { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #cbd8e2; border-radius: 6px; background: #fff; }
.smart-experience .cost-number input { width: 106px; max-width: 100%; min-width: 0; border: 0; background: transparent; text-align: right; color: #233f5a; font: 17px var(--mono, monospace); font-variant-numeric: tabular-nums; }
.smart-experience .cost-number > span { color: #75899c; font: 11px var(--mono, monospace); }
.smart-experience .cost-control input[type="range"] { display: block; width: 100%; min-height: 30px; margin: 12px 0 0; accent-color: #456e99; cursor: pointer; }
.smart-experience .cost-scale { display: flex; justify-content: space-between; color: #728498; font: 10px var(--mono, monospace); }
.smart-experience .cost-model { display: grid; gap: 9px; margin-top: 28px; }
.smart-experience .cost-model label { color: #30475d; font-size: 13px; }
.smart-experience .cost-model select { width: 100%; min-width: 0; min-height: 45px; padding: 10px 30px 10px 12px; border: 1px solid #cbd8e2; border-radius: 6px; background: #fff; color: #243e58; font-family: inherit; font-size: 14px; }
.smart-experience .cost-model small { color: #728498; font-size: 10px; }
.smart-experience .cost-unit { margin-top: 16px; color: #728498; font-size: 10px; line-height: 1.7; }
.smart-experience .cost-sync { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: baseline; margin-top: 21px; padding-top: 16px; border-top: 1px solid #dae3eb; }
.smart-experience .cost-sync > span { flex: 1 1 150px; color: #5e788c; font-size: 10px; line-height: 1.6; }
.smart-experience .cost-sync button { padding: 4px 0; border: 0; border-bottom: 1px solid #839bb0; background: transparent; color: #345b7c; font-family: inherit; font-size: 11px; cursor: pointer; }
.smart-experience .cost-sync button:disabled { cursor: wait; opacity: .55; }
.smart-experience .smart-cost :is(input, select, button):focus-visible { outline: 3px solid #6f9fba; outline-offset: 3px; }
.smart-experience .cost-result { min-width: 0; padding: 27px 34px; border-left: 1px solid #d6e0e7; }
.smart-experience .cost-difference { padding-bottom: 18px; border-bottom: 1px solid #e1e9e7; }
.smart-experience .cost-difference > p { color: #41635b; font-size: 13px; }
.smart-experience .cost-difference-amount { display: flex; flex-wrap: wrap; gap: 10px 17px; align-items: baseline; margin-top: 12px; }
.smart-experience .cost-difference-amount strong { max-width: 100%; color: #175d4c; font-size: clamp(37px, 4.7vw, 66px); font-weight: 500; line-height: 1.1; letter-spacing: -.065em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.smart-experience .smart-cost.has-small-value .cost-difference-amount strong { font-size: clamp(24px, 3vw, 38px); letter-spacing: -.03em; }
.smart-experience .cost-percentage { padding: 5px 9px; border: 1px solid #c8dfd7; border-radius: 5px; background: #eef6f2; color: #2b6b58; font-size: 12px; font-variant-numeric: tabular-nums; }
.smart-experience .cost-chart { margin-top: 18px; }
.smart-experience .cost-chart > p { margin-bottom: 12px; color: #71818a; font-size: 10px; }
.smart-experience .cost-row + .cost-row { margin-top: 19px; }
.smart-experience .cost-row-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 7px 14px; }
.smart-experience .cost-row-heading > span { color: #274b44; font-size: 13px; }
.smart-experience .cost-row-heading strong { color: #214e43; font-size: clamp(22px, 2.7vw, 32px); line-height: 1.2; font-weight: 500; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.smart-experience .cost-row.is-reference .cost-row-heading > span,.smart-experience .cost-row.is-reference .cost-row-heading strong { color: #365c82; }
.smart-experience .cost-track { height: 19px; margin-top: 12px; overflow: hidden; border-radius: 4px; background: #edf2f3; }
.smart-experience .cost-bar { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #27725d, #175b4b); transition: width .55s cubic-bezier(.22,.7,.21,1); }
.smart-experience .cost-row.is-reference .cost-bar { background: linear-gradient(90deg, #b8cfdf, #779dbb); }
.smart-experience .cost-row > small { display: block; margin-top: 9px; color: #71858d; font-size: 10px; line-height: 1.7; }
.smart-experience .smart-cost.is-higher .cost-difference > p,.smart-experience .smart-cost.is-higher .cost-difference-amount strong { color: #825a37; }
.smart-experience .smart-cost.is-higher .cost-percentage { border-color: #e2d5c4; background: #faf5ed; color: #825a37; }
.smart-experience .smart-cost.is-unavailable .cost-difference-amount strong { color: #78918a; }
.smart-experience .cost-announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.smart-experience .cost-context { margin-top: 16px; padding: 10px 13px; border: 1px solid #e2d5c4; border-radius: 6px; background: #faf5ed; color: #825a37; font-size: 12px; line-height: 1.7; }
.smart-experience .cost-boundary { margin-top: 18px; max-width: 76em; color: #77858b; font-size: 10px; line-height: 1.8; }

/* Block A: one request's internal trace and its bill. */
.smart-experience .value-trace {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: 38px;
  margin-top: 36px; padding: 34px 38px; border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(600px 340px at 0% 0%, rgba(39, 87, 178, .12), transparent 65%),
    radial-gradient(#ffffff08 1px, transparent 1.5px) 0 0 / 26px 26px,
    var(--smart-ink, #17283f);
  color: #e6edf6;
}
.smart-experience .trace-title { margin-bottom: 20px; color: #9fb0c4; font: 11px var(--mono, monospace); letter-spacing: .14em; text-transform: uppercase; }
.smart-experience .trace-steps { position: relative; margin: 0; padding: 0 0 0 2px; list-style: none; }
.smart-experience .trace-steps::before {
  content: ""; position: absolute; left: 14px; top: 18px; bottom: 18px; width: 1px;
  background: linear-gradient(#3a5578, #243a55);
}
.smart-experience .trace-steps::after {
  content: ""; position: absolute; left: 10.5px; top: 8%; width: 8px; height: 8px; border-radius: 50%;
  background: #4f83e8; box-shadow: 0 0 10px #4f83e899; transition: top .7s cubic-bezier(.3,.7,.3,1);
}
.smart-experience .value-trace[data-step="1"] .trace-steps::after { top: 8%; }
.smart-experience .value-trace[data-step="2"] .trace-steps::after { top: 25%; }
.smart-experience .value-trace[data-step="3"] .trace-steps::after { top: 41%; }
.smart-experience .value-trace[data-step="4"] .trace-steps::after { top: 58%; }
.smart-experience .value-trace[data-step="5"] .trace-steps::after { top: 75%; }
.smart-experience .value-trace[data-step="6"] .trace-steps::after { top: 92%; }
.smart-experience .trace-steps li { position: relative; display: flex; align-items: center; gap: 14px; padding: 9px 0; opacity: .35; transition: opacity .45s; }
.smart-experience .trace-steps li.is-past { opacity: .7; }
.smart-experience .trace-steps li.is-current { opacity: 1; }
.smart-experience .trace-index {
  position: relative; z-index: 1; flex: 0 0 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid #3a5578; border-radius: 7px; background: #1c3252;
  color: #8fa5c0; font: 10px var(--mono, monospace); transition: background .4s, color .4s, border-color .4s;
}
.smart-experience .trace-steps li.is-current .trace-index { border-color: #4f83e8; background: #2757b2; color: #fff; }
.smart-experience .trace-steps li > div { flex: 1 1 auto; min-width: 0; }
.smart-experience .trace-steps li strong { display: block; font-size: 13px; font-weight: 600; color: #eef3fa; }
.smart-experience .trace-steps li div span { display: block; margin-top: 2px; font-size: 11px; color: #9fb0c4; }
.smart-experience .trace-state {
  flex: 0 0 auto; padding: 3px 8px; border: 1px solid #4a6a94; border-radius: 4px;
  font: 9px var(--mono, monospace); font-style: normal; letter-spacing: .06em; color: #a9bdd6; white-space: nowrap;
}
.smart-experience .trace-state[data-state="free"] { border-color: #2f6b53; color: #7cd3b0; }
.smart-experience .trace-state[data-state="fail"] { border-color: #7a5a2e; color: #f0b35a; }
.smart-experience .trace-state[data-state="ok"] { border-color: #175d4c; background: #175d4c; color: #d8f2e6; }
.smart-experience .trace-bill { min-width: 0; padding: 24px 26px; border: 1px solid #2c4468; border-radius: 12px; background: #12203a80; }
.smart-experience .trace-bill dl { margin: 0; }
.smart-experience .trace-bill dl > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid #243a55;
  opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .5s;
}
.smart-experience .trace-bill dl > div.is-visible { opacity: 1; transform: none; }
.smart-experience .trace-bill dt { font-size: 12px; color: #b8c6d8; }
.smart-experience .trace-bill dt small { display: block; margin-top: 3px; font: 10px var(--mono, monospace); color: #7d90a8; }
.smart-experience .trace-bill dd { margin: 0; font: 14px var(--mono, monospace); color: #7cd3b0; white-space: nowrap; }
.smart-experience .trace-bill dl > div.is-final { border-bottom: 0; }
.smart-experience .trace-bill dl > div.is-final dd { font-size: 22px; color: #eef3fa; font-variant-numeric: tabular-nums; }
.smart-experience .trace-rate { margin-top: 14px; padding-top: 12px; border-top: 1px solid #243a55; font-size: 10px; line-height: 1.8; color: #7d90a8; }

/* Block B: price ladder + facts. */
.smart-experience .value-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 26px; margin-top: 26px; }
.smart-experience .value-ladder { min-width: 0; padding: 26px 28px; border: 1px solid #d6e0e7; border-radius: 14px; background: #fff; }
.smart-experience .ladder-title { font-size: 15px; font-weight: 600; color: #17283f; }
.smart-experience .ladder-sub { margin-top: 6px; font-size: 11px; color: #728498; }
.smart-experience .ladder-rows { position: relative; display: grid; grid-template-columns: minmax(96px, 150px) 1fr auto; align-items: center; gap: 15px 12px; margin: 20px 0 0; padding: 30px 0 0; list-style: none; }
.smart-experience .ladder-rows li { display: contents; }
.smart-experience .ladder-name { min-width: 0; font-size: 12px; font-weight: 500; color: #30475d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-experience .ladder-bar { position: relative; display: flex; height: 15px; border-radius: 4px; background: #edf2f3; overflow: visible; }
.smart-experience .ladder-bar i { display: block; height: 100%; width: 0; transition: width .6s cubic-bezier(.22,.7,.21,1); }
.smart-experience .ladder-bar i.is-within { border-radius: 4px 0 0 4px; background: linear-gradient(90deg, #779dbb, #365c82); }
.smart-experience .ladder-bar i.is-above { border-radius: 0 4px 4px 0; background: repeating-linear-gradient(45deg, #c9d6e2 0 3px, #dde7f0 3px 6px); }
.smart-experience .value-ladder.is-in .ladder-rows li:nth-child(1) i { width: calc(var(--w) * 100%); transition-delay: 0ms; }
.smart-experience .value-ladder.is-in .ladder-rows li:nth-child(2) i { width: calc(var(--w) * 100%); transition-delay: 60ms; }
.smart-experience .value-ladder.is-in .ladder-rows li:nth-child(3) i { width: calc(var(--w) * 100%); transition-delay: 120ms; }
.smart-experience .value-ladder.is-in .ladder-rows li:nth-child(4) i { width: calc(var(--w) * 100%); transition-delay: 180ms; }
.smart-experience .value-ladder.is-in .ladder-rows li:nth-child(5) i { width: calc(var(--w) * 100%); transition-delay: 240ms; }
.smart-experience .value-ladder.is-in .ladder-rows li:nth-child(6) i { width: calc(var(--w) * 100%); transition-delay: 300ms; }
.smart-experience .ladder-rows li.ladder-line { display: block; position: absolute; top: 30px; bottom: 0; pointer-events: none; }
.smart-experience .ladder-line::before {
  content: ""; position: absolute; top: -4px; bottom: -4px; left: calc(var(--x) * 100%); width: 2px;
  background: #175d4c; opacity: 0; transition: opacity .4s .5s;
}
.smart-experience .ladder-line span {
  position: absolute; top: -26px; left: calc(var(--x) * 100%); transform: translateX(-50%);
  padding: 2px 7px; border-radius: 4px; background: #175d4c; color: #eaf6f0;
  font: 9px var(--mono, monospace); white-space: nowrap; opacity: 0; transition: opacity .4s .5s;
}
.smart-experience .value-ladder.is-in .ladder-line::before, .smart-experience .value-ladder.is-in .ladder-line span { opacity: 1; }
.smart-experience .ladder-price { font: 12px var(--mono, monospace); color: #30475d; white-space: nowrap; }
.smart-experience .ladder-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 10px; color: #5e788c; }
.smart-experience .ladder-legend span { display: inline-flex; align-items: center; gap: 6px; }
.smart-experience .ladder-legend span::before { content: ""; width: 14px; height: 8px; border-radius: 2px; }
.smart-experience .ladder-legend .is-within::before { background: linear-gradient(90deg, #779dbb, #365c82); }
.smart-experience .ladder-legend .is-above::before { background: repeating-linear-gradient(45deg, #c9d6e2 0 3px, #dde7f0 3px 6px); }
.smart-experience .ladder-note { margin-top: 12px; font-size: 12px; line-height: 1.7; color: #41635b; }
.smart-experience .ladder-status { margin-top: 10px; font-size: 11px; color: #77858b; }
.smart-experience .value-facts {
  display: grid; grid-template-rows: repeat(4, 1fr); margin: 0; padding: 10px 26px;
  list-style: none; border: 1px solid #d6e0e7; border-radius: 14px; background: #fff;
}
.smart-experience .value-facts li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 14px 0; }
.smart-experience .value-facts li + li { border-top: 1px solid #dce1e5; }
.smart-experience .value-facts i { font: 10px var(--mono, monospace); font-style: normal; color: #8fa3b5; letter-spacing: .12em; }
.smart-experience .value-facts strong { display: block; font-size: 14px; font-weight: 600; color: #17283f; }
.smart-experience .value-facts span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.7; color: #4c627a; }

/* Block C heading + group positioning. */
.smart-experience .cost-title { margin-top: 46px; max-width: 46em; }
.smart-experience .cost-title .eyebrow { margin-bottom: 10px; color: #224dac; font: 11px var(--mono, monospace); letter-spacing: .14em; text-transform: uppercase; }
.smart-experience .cost-title h3 { font-size: clamp(20px, 2.6vw, 28px); font-weight: 600; letter-spacing: -.02em; color: #17283f; }
.smart-experience .cost-title > p:last-child { margin-top: 10px; font-size: 13px; line-height: 1.8; color: #4c627a; }
.smart-experience .value-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.smart-experience .value-groups > * {
  display: block; padding: 18px 22px; border: 1px solid #d6e0e7; border-radius: 12px;
  background: #fff; text-decoration: none; color: inherit; transition: border-color .2s;
}
.smart-experience .value-groups a:hover { border-color: #9db4c9; }
.smart-experience .value-groups .is-current { position: relative; border-color: #2757b2; box-shadow: 0 0 0 1px #2757b2 inset; }
.smart-experience .value-groups .group-current {
  position: absolute; top: -9px; right: 16px; display: inline; margin: 0; padding: 1px 8px;
  border-radius: 4px; background: #2757b2; color: #fff; font: 9px var(--mono, monospace); letter-spacing: .1em;
}
.smart-experience .value-groups strong { display: block; font-size: 14px; font-weight: 600; color: #17283f; }
.smart-experience .value-groups span { display: block; margin-top: 6px; font-size: 12px; line-height: 1.7; color: #4c627a; }
@media (max-width: 800px) {
  .smart-experience .smart-cost { grid-template-columns: 1fr; }
  .smart-experience .cost-result { grid-row: 1; border-left: 0; border-bottom: 1px solid #d6e0e7; padding: 29px; }
  .smart-experience .cost-controls { padding: 27px 29px; }
  .smart-experience .cost-difference-amount strong { font-size: 49px; }
  .smart-experience .cost-control-heading label { font-size: 13px; }
  .smart-experience .value-trace { grid-template-columns: 1fr; gap: 26px; padding: 28px 26px; }
  .smart-experience .value-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .smart-experience .value-groups { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .smart-experience .value-facts { padding: 6px 18px; }
  .smart-experience .value-facts li { gap: 12px; }
  .smart-experience .trace-steps li { display: grid; grid-template-columns: auto 1fr; }
  .smart-experience .trace-state { grid-column: 2; justify-self: start; margin-top: 6px; }
}
@media (max-width: 400px) {
  .smart-experience .cost-controls,.smart-experience .cost-result { padding: 23px 20px; }
  .smart-experience .cost-number input { width: 90px; font-size: 14px; }
  .smart-experience .cost-difference-amount strong { font-size: 43px; }
  .smart-experience .cost-row-heading strong { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .smart-experience .cost-bar { transition: none; }
  .smart-experience .trace-steps::after, .smart-experience .trace-steps li,
  .smart-experience .trace-bill dl > div { transition: none; }
  .smart-experience .value-ladder .ladder-bar i { width: calc(var(--w) * 100%) !important; transition: none; }
  .smart-experience .ladder-line::before, .smart-experience .ladder-line span { opacity: 1; transition: none; }
}
