/* tokens: /tokens ((misc)/tokens/client.tsx, tokens.module.css,
   components/contribution-graph.tsx). */
/* The original's pb-16 loses to .wide-shell's padding-block-end
   (globals.css comes later in the cascade), so no bottom padding. */
.tokens {
  font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}
.tokens [hidden] { display: none !important; }
.tokens .size-3 { width: .75rem; height: .75rem; }
.tokens .size-4 { width: 1rem; height: 1rem; }
.tokens-kicker {
  font-size: .875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}
.tokens-title {
  margin-top: .5rem;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 500;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) {
  .tokens-title { font-size: 2.25rem; line-height: 2.5rem; }
}
.tokens-sub {
  margin-top: .75rem;
  font-size: .875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}

/* MetricStrip (tokens.module.css metricGrid / metricCell) */
.tokens-metrics {
  background: hsl(var(--border));
  border: 1px solid hsl(var(--border));
  border-radius: .75rem;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
  margin-top: 2rem;
  overflow: hidden;
}
.tokens-metric {
  background: hsl(var(--background));
  min-width: 0;
  padding: 1.25rem;
}
.tokens-metric-value {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 500;
  letter-spacing: -.025em;
  color: hsl(var(--foreground));
  font-variant-numeric: tabular-nums;
}
@media (min-width: 640px) {
  .tokens-metric-value { font-size: 1.5rem; line-height: 2rem; }
}
.tokens-metric-label {
  margin-top: .25rem;
  font-size: .875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}

/* Past year heatmap */
.tokens-year { margin-top: 3rem; }
.tokens-year-head {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.tokens-note {
  font-size: .75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}
.tokens-graph {
  display: flex;
  max-width: 100%;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
  font-size: 11px;
}
.tokens-graph-cal { width: 100%; max-width: 100%; }
.tokens-graph-svg { display: block; height: auto; width: 100%; overflow: visible; }
.tokens-graph-months {
  fill: hsl(var(--muted-foreground));
  -webkit-user-select: none;
  user-select: none;
}
.tokens-cell {
  transition-property: filter, opacity;
  transition-duration: .1s;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  animation-duration: .1s;
  cursor: default;
}
.tokens-cell:hover { filter: brightness(1.25); opacity: .95; }
.tokens-cell:focus-visible {
  outline: 1px solid hsl(var(--foreground) / .4);
  outline-offset: 1px;
}
.tokens-heatmap [data-level="0"] { fill: hsl(var(--muted-foreground) / 0.08); }
.tokens-heatmap [data-level="1"] { fill: hsl(var(--muted-foreground) / 0.26); }
.tokens-heatmap [data-level="2"] { fill: hsl(var(--muted-foreground) / 0.46); }
.tokens-heatmap [data-level="3"] { fill: hsl(var(--foreground) / 0.68); }
.tokens-heatmap [data-level="4"] { fill: hsl(var(--foreground) / 0.92); }
.tokens-graph-foot {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  white-space: nowrap;
  margin-top: .25rem;
  align-items: center;
  font-size: .75rem;
  line-height: 1rem;
}
@media (min-width: 640px) {
  .tokens-graph-foot { column-gap: 1rem; }
}
.tokens-graph-sel {
  min-height: 1.25rem;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}
.tokens-legend {
  margin-left: auto;
  display: flex;
  align-items: center;
  font-size: .75rem;
  line-height: 1rem;
}
.tokens-legend-less { margin-right: .25rem; color: hsl(var(--muted-foreground)); }
.tokens-legend-more { margin-left: .25rem; color: hsl(var(--muted-foreground)); }

/* Tabs */
.tokens-tabs {
  margin-top: 3rem;
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid hsl(var(--border));
}
.tokens-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1rem .75rem;
  font-size: .875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-duration: .15s;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
}
.tokens-tab:hover, .tokens-tab[aria-selected="true"] { color: hsl(var(--foreground)); }
.tokens-tab-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: hsl(var(--foreground));
}
.tokens-tab[aria-selected="false"] .tokens-tab-line { display: none; }

/* Sections */
.tokens-section { padding-top: 2.5rem; }
.tokens-h2 {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
  letter-spacing: -.025em;
}
.tokens-h3 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
}
.tokens-h3-gap { margin-bottom: 1rem; }
.tokens-desc {
  margin-top: .5rem;
  font-size: .875rem;
  line-height: 1.5rem;
  color: hsl(var(--muted-foreground));
}
.tokens-desc-wide { max-width: 56rem; }
.tokens-empty {
  padding-top: 3rem;
  padding-bottom: 3rem;
  text-align: center;
  font-size: .875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}
.tokens-track {
  background: hsl(var(--muted));
  border-radius: 9999px;
  display: block;
  height: .25rem;
  overflow: hidden;
}
.tokens-fill {
  background: hsl(var(--foreground) / 0.72);
  border-radius: inherit;
  display: block;
  height: 100%;
}

/* Models: DetailStat row */
.tokens-details {
  margin-top: 1.75rem;
  display: grid;
  max-width: 48rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  border-bottom: 1px solid hsl(var(--border));
}
.tokens-detail {
  min-width: 0;
  border-right: 1px solid hsl(var(--border));
  padding: 1.25rem 2rem 1.25rem 0;
}
.tokens-detail:last-child { border-right-width: 0; }
@media (min-width: 640px) {
  .tokens-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tokens-detail { padding-left: 1.25rem; padding-right: 1.25rem; }
  .tokens-detail:first-child { padding-left: 0; }
}
.tokens-detail-label {
  font-size: .75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}
.tokens-detail-value {
  margin-top: .5rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 500;
  letter-spacing: -.025em;
  color: hsl(var(--foreground));
  font-variant-numeric: tabular-nums;
}
.tokens-detail-note {
  margin-top: .25rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  font-size: .75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

/* Models table */
.tokens-models { margin-top: 1.75rem; }
.tokens-model-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: .875rem;
  line-height: 1.25rem;
}
.tokens-model-table thead tr {
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
  font-size: .75rem;
  line-height: 1rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}
.tokens-model-table th { font-weight: 400; padding-top: .75rem; padding-bottom: .75rem; }
.tokens-model-table tbody tr { border-bottom: 1px solid hsl(var(--border) / .7); }
.tokens-model-table tbody tr:last-child { border-bottom-width: 0; }
.tm-model { width: 40%; padding-left: .5rem; padding-right: .5rem; }
.tm-num { padding-left: .5rem; padding-right: .5rem; text-align: right; }
.tm-opt { display: none; padding-left: 1rem; padding-right: 1rem; text-align: right; }
.tm-model-cell { min-width: 0; padding: 1.25rem .5rem; }
.tm-num-cell { padding: 1.25rem .5rem; text-align: right; font-variant-numeric: tabular-nums; }
.tm-opt-cell { display: none; padding: 1.25rem 1rem; text-align: right; font-variant-numeric: tabular-nums; }
.tm-muted { color: hsl(var(--muted-foreground)); }
@media (min-width: 640px) {
  .tm-model { width: 33.3333%; padding-left: 1rem; padding-right: 1rem; }
  .tm-num, .tm-model-cell, .tm-num-cell { padding-left: 1rem; padding-right: 1rem; }
  .tm-sm { display: table-cell; }
}
@media (min-width: 768px) {
  .tm-md { display: table-cell; }
}
@media (min-width: 1024px) {
  .tm-model { width: 25%; }
  .tm-lg { display: table-cell; }
}
@media (min-width: 1280px) {
  .tm-xl { display: table-cell; }
}
.tm-model-id { display: flex; align-items: center; gap: .75rem; }
.tm-icon {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--muted) / .3);
}
.tm-icon-img { display: block; width: 1.25rem; height: 1.25rem; object-fit: contain; color: transparent; }
.tm-names { min-width: 0; }
.tm-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  font-weight: 500;
}
.tm-provider {
  margin-top: .125rem;
  font-size: .75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}
.tm-tokens { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; }
/* tokens.module.css .breakdownTrack (display:block) loads after
   Tailwind and beats "hidden", so the track shows at every width. */
.tm-track { width: 5rem; }
.tm-split {
  margin-top: .25rem;
  display: none;
  justify-content: flex-end;
  gap: .5rem;
  font-size: .75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}
.tm-split > span { display: inline-flex; align-items: center; gap: .125rem; }
@media (min-width: 1024px) {
  .tm-split { display: flex; }
}
.tm-sub {
  margin-top: .25rem;
  font-size: .75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}

/* Activity */
.tokens-block { margin-top: 2.5rem; }
.tokens-hours {
  margin-top: 1.75rem;
  border-bottom: 1px solid hsl(var(--border));
  padding-bottom: 1.75rem;
}
.tokens-hour-bars { display: flex; height: 11rem; align-items: flex-end; gap: .25rem; }
@media (min-width: 640px) {
  .tokens-hour-bars { gap: .5rem; }
}
.tokens-hour { display: flex; height: 100%; min-width: 0; flex: 1; align-items: flex-end; }
.tokens-hour-bar {
  background: hsl(var(--foreground) / 0.72);
  border-radius: .125rem .125rem 0 0;
  min-height: .125rem;
  transition: background-color 150ms ease;
  width: 100%;
}
.tokens-hour-bar:hover { background: hsl(var(--foreground)); }
@media (prefers-reduced-motion: reduce) {
  .tokens-hour-bar { transition: none; }
}
.tokens-hour-axis {
  margin-top: .5rem;
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}
.tokens-scroll { overflow-x: auto; }
.tokens-errors { margin-top: 1.75rem; }
.tokens-req-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  line-height: 1.25rem;
}
.tokens-req-table thead tr {
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
  font-size: .75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}
.tokens-req-table th { padding: .75rem 1rem; font-weight: 400; }
.tokens-req-table td { padding: 1rem; }
.tokens-req-table tbody tr { border-bottom: 1px solid hsl(var(--border) / .7); }
.tokens-req-table tbody tr:last-child { border-bottom-width: 0; }
.tokens-req-table .r { text-align: right; }
.tokens-req-table td.r { font-variant-numeric: tabular-nums; }
.tr-muted { color: hsl(var(--muted-foreground)); }
.tr-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
  font-size: .75rem;
  line-height: 1rem;
}
.tokens-req-table .tr-xs { font-size: .75rem; line-height: 1rem; }
.tr-model, .tr-msg { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.tr-model { max-width: 16rem; }
.tr-model-narrow { max-width: 14rem; }
.tr-msg { max-width: 28rem; }

/* Controller */
.tokens-controller { margin-top: 2.25rem; display: grid; gap: 2.5rem; }
@media (min-width: 1024px) {
  .tokens-controller { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tokens-breakdown { margin-top: 1rem; border-top: 1px solid hsl(var(--border)); }
.tokens-break-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid hsl(var(--border) / .7);
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: .875rem;
  line-height: 1.25rem;
}
.tokens-break-row:last-child { border-bottom-width: 0; }
.tokens-break-label { width: 7rem; flex-shrink: 0; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.tokens-break-track { min-width: 0; flex: 1; }
.tokens-break-value {
  flex-shrink: 0;
  text-align: right;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

