.usage-chart {
  display: grid;
  gap: .36rem;
  padding: .07rem .75rem .62rem;
}

.usage-chart:empty {
  display: none;
}

.usage-chart-row {
  display: grid;
  grid-template-columns: minmax(5rem, 1.1fr) minmax(3.2rem, 1fr);
  align-items: center;
  gap: .5rem;
}

.usage-chart-label {
  min-inline-size: 0;
  overflow: hidden;
  color: #456476;
  font: .62rem/1.35 ui-monospace, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-chart-track {
  display: block;
  block-size: .34rem;
  overflow: hidden;
  border-radius: 99px;
  background: #e8f2f7;
}

.usage-chart-fill {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  border-radius: inherit;
  background: var(--usage-color, #6cc4ef);
  transform: scaleX(var(--usage-share, 0));
  transform-origin: left center;
}

[data-showcase-code] {
  display: block;
}

[data-showcase-model] {
  position: relative;
}

[data-showcase-model]::after {
  position: absolute;
  inset: auto .7rem .25rem;
  block-size: .13rem;
  border-radius: 99px;
  background: #6cc4ef;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: scaleX(.8);
}

[data-showcase-model][aria-pressed="true"]::after {
  opacity: 1;
  transform: scaleX(1);
}

@media (prefers-reduced-motion: no-preference) {
  .usage-chart-fill {
    transition: transform 380ms cubic-bezier(.2, 0, 0, 1);
  }

  [data-showcase-model] {
    transition: background-color 160ms ease, border-color 160ms ease, transform 150ms ease-out;
  }

  [data-showcase-model]::after {
    transition: opacity 145ms ease, transform 210ms cubic-bezier(.2, 0, 0, 1);
  }

  [data-showcase-model]:active,
  [data-console] button:not(:disabled):active {
    transform: scale(.96);
  }

  [data-console] button {
    transition: background-color 140ms ease, color 140ms ease, transform 150ms ease-out;
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  [data-showcase-model]:hover:not(:active) {
    transform: translateY(-2px);
  }
}

.tuning-demo-controls,
.tuning-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem .9rem;
}

.tuning-demo-controls > span {
  color: var(--panel-muted);
  font-size: .73rem;
}

[data-tuning-play] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .34rem;
  min-block-size: 2.25rem;
  padding: .28rem .57rem;
  border: 1px solid #668b9d;
  border-radius: .2rem;
  background: #243c4a;
  color: #e9f8ff;
  font-weight: 620;
  font-size: .76rem;
}

[data-tuning-play]:hover { background: #305467; }
[data-tuning-play]:focus-visible { outline-color: var(--accent); }

[data-tuning-icon] { display: inline-grid; inline-size: 1em; place-items: center; }

.tuning-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .22rem .48rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .68rem;
  color: var(--panel-muted);
}

.tuning-steps li {
  display: flex;
  align-items: center;
  gap: .33rem;
}

.tuning-steps li::before {
  inline-size: .4rem;
  block-size: .4rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.tuning-steps [aria-current="step"] { color: #bceaff; }
.tuning-steps [aria-current="step"]::before,
[data-tuning-demo][data-tuning-state="complete"] .tuning-steps li::before { background: var(--accent); border-color: var(--accent); }

.motion-progress {
  position: fixed;
  z-index: 6;
  inset: 0 0 auto;
  block-size: 3px;
  background: var(--accent-ink);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
}

@keyframes motion-enter {
  from { opacity: 0; translate: 0 15px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes motion-panel {
  from { opacity: 0; scale: .986; translate: 0 18px; }
  to { opacity: 1; scale: 1; translate: 0 0; }
}

@keyframes motion-mark {
  from { scale: .025 1; }
  to { scale: 1 1; }
}

@keyframes motion-segment {
  from { opacity: 0; scale: .46; }
  72% { opacity: 1; }
  to { opacity: 1; scale: 1; }
}

@keyframes motion-scan {
  from { opacity: 0; transform: translateX(-100%); }
  16%, 85% { opacity: 1; }
  to { opacity: 0; transform: translateX(430%); }
}

@keyframes motion-scroll { to { transform: scaleX(1); } }
@keyframes motion-view-in { from { opacity: 0; translate: 0 8px; } }
@keyframes motion-view-out { to { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  .header { view-transition-name: doodee-header; }
  ::view-transition-group(doodee-header),
  ::view-transition-old(doodee-header),
  ::view-transition-new(doodee-header) { animation-duration: 200ms; }
  ::view-transition-old(root) { animation: motion-view-out 145ms ease-out both; }
  ::view-transition-new(root) { animation: motion-view-in 300ms cubic-bezier(.2, 0, 0, 1) both; }
  ::view-transition { pointer-events: none; }

  [data-motion-in] {
    animation: motion-enter 420ms cubic-bezier(.2, 0, 0, 1) var(--motion-delay, 0ms) both;
  }

  :is(.dashboard, .product-visual, .model-showcase, .feature-grid article, .terminal)[data-motion-in] {
    animation-name: motion-panel;
    animation-duration: 540ms;
  }

  [data-motion-in] mark {
    position: relative;
    isolation: isolate;
    background: none;
    box-shadow: none;
  }

  [data-motion-in] mark::before {
    position: absolute;
    z-index: -1;
    inset: -.11em 0 0;
    background: var(--accent);
    content: "";
    transform-origin: left center;
    animation: motion-mark 620ms cubic-bezier(.2, 0, 0, 1) var(--motion-delay, 0ms) both;
  }

  [data-tuning-demo][data-tuning-state="playing"] .tuning-reviewed {
    animation: motion-segment 415ms cubic-bezier(.2, 0, 0, 1) var(--tuning-delay) both;
  }

  .tuning-matrix { position: relative; overflow: clip; }

  [data-tuning-demo][data-tuning-state="playing"] .tuning-matrix::after {
    position: absolute;
    inset: 0 auto 0 0;
    inline-size: 21%;
    background: linear-gradient(90deg, transparent, #89dcff29, transparent);
    content: "";
    pointer-events: none;
    animation: motion-scan 1280ms cubic-bezier(.2, 0, .4, 1) 360ms both;
  }

  :is(.button, [data-tuning-play], .terminal-tabs button, .catalog-filter-group button, [data-api-run]) {
    transition: scale 150ms ease-out, background-color 150ms ease, color 150ms ease, border-color 150ms ease;
  }

  :is(.button, [data-tuning-play], .terminal-tabs button, .catalog-filter-group button, [data-api-run]):not(:disabled):active {
    scale: .96;
  }

  .tuning-steps li, .tuning-steps li::before {
    transition: color 140ms ease-out, background-color 140ms ease-out, border-color 140ms ease-out, scale 140ms ease-out;
  }

  .tuning-steps [aria-current="step"]::before { scale: 1.2; }

  .motion-indicator {
    position: absolute;
    z-index: 1;
    inset: 0 auto auto 0;
    inline-size: 2px;
    block-size: 12px;
    border-radius: 1px;
    background: var(--accent-ink);
    pointer-events: none;
    transform-origin: top left;
  }

  .console-nav .motion-indicator { background: #182d3c; }

  .motion-indicator.is-ready {
    transition: transform 330ms cubic-bezier(.2, 0, 0, 1);
  }

  @supports (animation-timeline: scroll(root block)) {
    .motion-progress {
      animation: motion-scroll linear both;
      animation-timeline: scroll(root block);
    }
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  :is(.text-link, .welcome-offer) .arrow,
  .catalog-action a span:last-child {
    transition: translate 170ms cubic-bezier(.2, 0, 0, 1);
  }

  :is(.text-link, .welcome-offer):hover .arrow,
  .catalog-action a:hover span:last-child { translate: 2px -2px; }

  :is(.feature-grid article, .guide-grid article, .plan-card, .docs-cards a, .article-grid article) {
    transition: translate 230ms cubic-bezier(.2, 0, 0, 1), border-color 200ms ease-out, box-shadow 230ms ease-out;
  }

  :is(.feature-grid article, .guide-grid article, .plan-card, .docs-cards a, .article-grid article):hover {
    translate: 0 -4px;
    box-shadow: 0 12px 30px -20px #123a57aa;
  }
}

.console-nav, .catalog-filter-group { position: relative; }
.motion-indicator { position: absolute; pointer-events: none; }

.model-brand-mark {
  flex: none;
}

.model-brand-mark img {
  display: block;
  inline-size: 68%;
  block-size: 68%;
  object-fit: contain;
}

.showcase-name .model-brand-mark {
  background: #fff;
}

.plan-card h3 {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.route-layout {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
  align-items: center;
  gap: clamp(1.6rem, 5vw, 5rem);
}

.route-card {
  min-inline-size: 0;
  overflow: clip;
  border: 1px solid #cbdfea;
  border-radius: .7rem;
  background: var(--surface);
}

.route-choices {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .65rem;
  border-block-end: 1px solid #d8e7ef;
}

.route-choices button {
  min-block-size: 2.75rem;
  padding: .38rem .75rem;
  border: 1px solid transparent;
  border-radius: .26rem;
  background: transparent;
  color: var(--muted);
  font-weight: 590;
  font-size: .85rem;
  transition: background-color 115ms ease-out, color 115ms ease-out;
}

.route-choices button:hover { background: var(--surface-soft); }
.route-choices [aria-pressed="true"], .route-choices [aria-pressed="true"]:hover {
  border-color: #a9d9f3;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.route-diagram {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr) minmax(0, 1fr);
  gap: clamp(.35rem, 1.5vw, .9rem);
  padding: clamp(.7rem, 2.2vw, 1.3rem) clamp(.7rem, 2.2vw, 1.3rem) 2.2rem;
  background: radial-gradient(circle, #9abbd050 1px, transparent 1px) 0 0 / 12px 12px, #f9fcff;
}

.route-diagram::after {
  position: absolute;
  inset: auto 11% .9rem;
  border-block-end: 1px dashed #81adc7;
  content: "";
}

.route-node {
  display: grid;
  align-content: center;
  min-block-size: 5.45rem;
  padding: .62rem clamp(.48rem, 1.2vw, .8rem);
  border: 1px solid #d4e6f0;
  border-radius: .36rem;
  background: #fff;
  box-shadow: 0 2px 0 #dbe9f3;
  overflow-wrap: anywhere;
  line-height: 1.38;
}

.route-node span { color: var(--muted); font-size: .72rem; }
.route-node strong { margin-block-start: .28rem; font-size: clamp(.77rem, 1.4vw, .91rem); }
.route-gateway, .route-output { text-align: center; }
.route-gateway { border-color: #b9d6e9; background: #17374c; color: #fff; }
.route-gateway span { color: #c4e3f6; }
.route-output { border-color: #a5cfea; background: #e6f5fe; box-shadow: 0 2px 0 #bfdff4; }

.route-travel {
  position: absolute;
  z-index: 1;
  inset: auto 11% calc(.9rem - 5px);
  block-size: 10px;
  opacity: 0;
  pointer-events: none;
}

.route-packet {
  position: absolute;
  inline-size: 10px;
  block-size: 10px;
  inset: 0 auto 0 -5px;
  border: 2px solid #0d4d73;
  border-radius: 50%;
  background: #8edcff;
  box-shadow: 0 0 0 4px #9bdcfa71;
}

.route-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .05rem 1rem;
  padding: .17rem .8rem;
  border-block-start: 1px solid #d8e7ef;
  color: var(--muted);
  font-size: .75rem;
}

.route-footer a { display: inline-flex; align-items: center; gap: .25rem; min-block-size: 2.75rem; }
.menu-lines { display: grid; gap: 4px; }
.menu-lines i { inline-size: 16px; block-size: 2px; border-radius: 2px; background: currentColor; }
.menu-toggle[aria-expanded="true"] .menu-lines i:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-lines i:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (prefers-reduced-motion: no-preference) {
  .route-choices button { transition: scale 150ms ease-out, background-color 115ms ease-out, color 115ms ease-out; }
  .route-choices button:active { scale: .96; }
  .menu-lines i { transition: transform 170ms cubic-bezier(.2, 0, 0, 1); }
}

@media (max-width: 760px) {
  .route-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (pointer: coarse) {
  .header .menu-toggle { min-inline-size: 2.75rem; min-block-size: 2.75rem; }
  .header .header-actions .button { min-block-size: 2.75rem; }
  .header .main-nav a, .header .signin { min-block-size: 2.75rem; display: flex; align-items: center; }
  :is(.console-nav, .console-run, .console-billing, .terminal, .console-head .segmented) button {
    min-block-size: 2.75rem;
    min-inline-size: 2.75rem;
  }
}

.discount-table .model-brand-mark {
  margin-inline-end: .5rem;
  vertical-align: middle;
}

.catalog-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, .38fr);
  align-items: center;
  gap: clamp(.6rem, 2vw, 2rem);
  margin-block: .25rem 1.5rem;
  min-inline-size: 0;
}

.catalog-intro h1 {
  font-size: clamp(2.1rem, 1.15rem + 3.55vw, 4.5rem);
  font-weight: 630;
  letter-spacing: -.055em;
  line-height: 1.13;
  text-wrap: balance;
}

.catalog-intro mark {
  display: inline-block;
  padding-inline: .12em;
  background: var(--accent);
  color: var(--ink);
}

.catalog-intro p {
  margin-block-start: .55rem;
  color: var(--muted);
  font-size: .95rem;
}

.provider-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-block-start: 1rem;
}

.provider-shortcuts a {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  min-block-size: 2.45rem;
  padding: .24rem .49rem .24rem .36rem;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-weight: 610;
  font-size: .73rem;
}

.provider-shortcuts a:hover,
.provider-shortcuts a[aria-current="true"] {
  border-color: var(--accent-ink);
  background: var(--accent-soft);
}

.provider-shortcuts .provider-mark {
  inline-size: 1.35rem;
  block-size: 1.35rem;
}

.art-stage {
  position: relative;
  isolation: isolate;
  overflow: clip;
  inline-size: 100%;
  aspect-ratio: 2;
}

.art-stage img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

.art-gateway {
  inline-size: min(100%, 24.4rem);
  margin-block: -.7rem .55rem;
}

.art-catalog {
  inline-size: min(100%, 21rem);
  aspect-ratio: 1.76;
  justify-self: end;
}

.art-trace,
.art-spark {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.art-trace {
  inset: 0;
  background: linear-gradient(112deg, transparent 40%, #b5eaff85 48%, transparent 57%);
  opacity: 0;
}

.art-spark {
  inset-inline-start: 67%;
  inset-block-start: 27%;
  inline-size: .48rem;
  block-size: .48rem;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  box-shadow: 0 0 .6rem .2rem #84d7ff;
}

@media (max-width: 680px) {
  .catalog-intro { grid-template-columns: 1fr; gap: .15rem; }
  .art-catalog { inline-size: min(58vw, 13.6rem); aspect-ratio: 2; justify-self: center; margin-block-start: .3rem; }
  .art-gateway { inline-size: min(82vw, 19.5rem); margin-block: .05rem .57rem; }
}

@keyframes visual-scene-in {
  from { opacity: 0; transform: perspective(580px) rotateY(-12deg) rotateX(5deg) scale(.8) translateX(18px); }
  to { opacity: 1; transform: perspective(580px) rotateY(0) rotateX(0) scale(1) translateX(0); }
}

@keyframes visual-sweep {
  0% { opacity: 0; transform: translateX(-65%); }
  21% { opacity: .76; }
  82%, 100% { opacity: 0; transform: translateX(79%); }
}

@keyframes visual-spark {
  0%, 100% { opacity: 0; scale: .35; }
  48% { opacity: .9; scale: 1.45; }
}

@keyframes brand-mark-in {
  from { opacity: .18; transform: rotate(-20deg) translateY(6px) scale(.72); }
  to { opacity: 1; transform: rotate(0) translateY(0) scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .art-stage img {
    translate: var(--art-x, 0) var(--art-y, 0);
    transition: translate 260ms cubic-bezier(.2, 0, 0, 1);
  }

  [data-art-enter] img {
    animation: visual-scene-in 880ms cubic-bezier(.15, .7, .25, 1) both;
  }

  [data-art-enter] .art-trace {
    animation: visual-sweep 1180ms 260ms ease-out both;
  }

  [data-art-enter] .art-spark {
    animation: visual-spark 960ms 550ms ease-out 2;
  }

  :is([data-motion-in], [data-motion-in] *) > .model-brand-mark img {
    animation: brand-mark-in 510ms cubic-bezier(.21, .83, .27, 1) var(--motion-delay, 0ms) both;
  }

  :is(.provider-shortcuts a, .catalog-model-name, .provider-strip a) .model-brand-mark {
    transition: scale 210ms cubic-bezier(.2, 0, 0, 1), rotate 210ms cubic-bezier(.2, 0, 0, 1);
  }

  .provider-shortcuts a {
    transition: translate 180ms ease-out, background-color 160ms ease-out, border-color 160ms ease-out;
  }

  .provider-shortcuts a:active { translate: 0 2px; }
  .provider-shortcuts a[aria-current="true"] .model-brand-mark { scale: 1.12; rotate: -8deg; }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  :is(.provider-shortcuts a, .provider-strip a, .product-catalog-table tr):hover .model-brand-mark {
    scale: 1.17;
    rotate: -10deg;
  }

  .provider-shortcuts a:hover { translate: 0 -3px; }
}
