/* Galaxy segmented-track adaptation; attribution: /galaxy-license.txt.
   Everything is scoped to this read-only usage view, not the app shell. */
.token-workbench {
  --tu-yellow: #ffca38;
  --tu-ink: #20211f;
  --tu-muted: #666963;
  --tu-line: #e7e8e3;
  flex: 1; min-width: 0; overflow-y: auto;
  padding: 28px clamp(16px, 2.5vw, 40px) 100px;
  color: var(--tu-ink); background: #f4f4f4;
  font-size: 13px; line-height: 1.55; font-variant-numeric: tabular-nums;
}
.token-workbench .tu-content { max-width: 1540px; margin: 0 auto; display: grid; gap: 20px; }
.token-workbench :is(h2,h3,p,dl,dd) { margin: 0; }
.token-workbench h2 { font-size: 25px; line-height: 1.35; font-weight: 750; letter-spacing: -.6px; text-wrap: balance; }
.token-workbench h3 { font-size: 16px; font-weight: 700; text-wrap: balance; }
.token-workbench :is(p,small) { text-wrap: pretty; }
.token-workbench small { font-size: 12px; color: var(--tu-muted); }
.token-workbench .tu-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--tu-muted); margin-bottom: 7px; }
.token-workbench .tu-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.token-workbench .tu-subtitle { margin-top: 7px; color: var(--tu-muted); }
.token-workbench .tu-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.token-workbench :is(button,input,select,summary) { font: inherit; }
.token-workbench button { cursor: pointer; }
.token-workbench button:disabled { cursor: wait; opacity: .55; }
.token-workbench :is(button,summary,input,select):focus-visible { outline: 2px solid var(--tu-ink); outline-offset: 3px; }
.token-workbench .tu-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border: 1px solid #dedfd9; border-radius: 10px; padding: 8px 14px; background: #fff; color: var(--tu-ink); font-weight: 600; white-space: nowrap; transition: background-color 150ms, transform 150ms; }
.token-workbench .tu-button:hover:not(:disabled) { background: #f2f2ee; }
.token-workbench .tu-button:active:not(:disabled) { transform: translateY(1px); }
.token-workbench .tu-button svg { width: 15px; height: 15px; }
.token-workbench .tu-segment { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 4px; border: 1px solid #e0e1dc; border-radius: 13px; background: #eaece6; min-width: 280px; }
.token-workbench .tu-segment::before { content: ''; position: absolute; z-index: -1; inset: 4px auto 4px 4px; width: calc((100% - 8px)/4); border-radius: 9px; background: var(--tu-yellow); box-shadow: 0 1px 3px #23271d12; transform: translateX(calc(var(--tu-active,0)*100%)); transition: transform 200ms cubic-bezier(.2,.8,.2,1); }
.token-workbench .tu-segment button { min-height: 40px; padding: 8px 12px; border: 0; border-radius: 9px; color: #60635d; background: transparent; white-space: nowrap; }
.token-workbench .tu-segment button[aria-pressed=true] { color: #171812; font-weight: 750; }
.token-workbench .tu-segment button:hover:not(:disabled) { color: #141510; }
.token-workbench .tu-overview { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); gap: 20px; }
.token-workbench .tu-panel { min-width: 0; border: 1px solid var(--tu-line); border-radius: 18px; background: #ffffff; box-shadow: 0 2px 5px #20241903; }
.token-workbench .tu-cost { padding: 25px 28px 22px; background: #242622; color: #fff; position: relative; overflow: hidden; }
.token-workbench .tu-cost .tu-eyebrow { color: #c3c7bd; }
.token-workbench .tu-cost h3 { color: #e9ece5; font-size: 13px; font-weight: 500; }
.token-workbench .tu-cost-heading { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.token-workbench .tu-currency { font-size: 10px; letter-spacing: 1px; border: 1px solid #52564e; border-radius: 6px; padding: 3px 8px; color: #e0e4d9; }
.token-workbench .tu-amount { display: block; font-size: clamp(30px,3.5vw,48px); font-weight: 650; line-height: 1.15; letter-spacing: -1.8px; margin: 16px 0 13px; overflow-wrap: anywhere; }
.token-workbench .tu-cost-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: #c9cdc3; font-size: 12px; }
.token-workbench .tu-tag { display: inline-flex; padding: 3px 8px; align-items: center; border-radius: 6px; font-size: 11px; font-weight: 650; background: #f5f5ef; color: #62665b; }
.token-workbench .tu-tag.is-warning { background: #fff2c7; color: #795200; }
.token-workbench .tu-cost-foot { margin-top: 21px; padding-top: 13px; border-top: 1px solid #484d42; color: #d6dacd; font-size: 11px; }
.token-workbench .tu-metrics { display: grid; grid-template-columns: 1fr 1fr; }
.token-workbench .tu-metric { min-width: 0; padding: 22px 24px; }
.token-workbench .tu-metric:nth-child(2) { border-left: 1px solid var(--tu-line); }
.token-workbench .tu-metric dt { color: var(--tu-muted); font-size: 12px; }
.token-workbench .tu-metric dd { font-size: clamp(24px,2.5vw,33px); font-weight: 700; line-height: 1.25; letter-spacing: -1px; margin: 9px 0 5px; overflow-wrap: anywhere; }
.token-workbench .tu-social { grid-column: 1/-1; padding: 16px 24px; border-top: 1px solid var(--tu-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.token-workbench .tu-social-title { display: flex; gap: 12px; align-items: center; }
.token-workbench .tu-social-title strong { font-size: 21px; }
.token-workbench .tu-social p { color: var(--tu-muted); font-size: 11px; margin-top: 3px; }
.token-workbench .tu-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #efd899; border-radius: 12px; padding: 13px 17px; background: #fff9e9; color: #755000; }
.token-workbench .tu-alert p { font-size: 12px; margin-top: 3px; }
.token-workbench .tu-alert.is-error { background: #fff3ef; border-color: #ebccc3; color: #912e1d; }
.token-workbench .tu-loading { padding: 22px; }
.token-workbench .tu-loading-line { height: 18px; width: 48%; margin: 18px 0; background: #e9eae5; border-radius: 5px; }
.token-workbench .tu-loading-line.wide { height: 42px; width: 80%; }
.token-workbench .tu-section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
.token-workbench .tu-section-head p { color: var(--tu-muted); font-size: 12px; margin-top: 4px; }
.token-workbench .tu-trend { display: grid; grid-template-columns: minmax(0,1fr) 228px; padding: 24px; gap: 26px; }
.token-workbench .tu-chart-column { min-width: 0; }
.token-workbench .tu-legend { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; color: var(--tu-muted); }
.token-workbench .tu-legend::before { content: ''; width: 8px; height: 8px; background: #a5a5a5; border-radius: 2px; }
.token-workbench .tu-chart { display: flex; align-items: stretch; gap: 5px; height: 126px; border-bottom: 1px solid #d0d0d0; background: repeating-linear-gradient(to top,transparent 0,transparent 40px,#ededed 41px,#ededed 42px); }
.token-workbench .tu-bar { position: relative; min-width: 0; flex: 1; display: flex; align-items: flex-end; padding: 0; border: 0; background: transparent; border-radius: 4px 4px 0 0; }
.token-workbench .tu-bar-fill { min-height: 2px; width: 100%; background: #a5a5a5; border-radius: 3px 3px 0 0; transition: background-color 140ms; }
.token-workbench .tu-bar[aria-pressed=true] .tu-bar-fill,.token-workbench .tu-bar:hover .tu-bar-fill { background: var(--tu-yellow); }
.token-workbench .tu-bar.is-negative .tu-bar-fill { background: repeating-linear-gradient(135deg,#929292 0,#929292 3px,#e3e3e3 3px,#e3e3e3 6px); }
.token-workbench .tu-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--tu-muted); font-size: 10px; }
.token-workbench .tu-chart-readout { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; min-height: 32px; margin-top: 9px; color: var(--tu-muted); font-size: 11px; }
.token-workbench .tu-chart-readout strong { color: var(--tu-ink); }
.token-workbench .tu-chart-readout label { display: flex; align-items: center; gap: 8px; }
.token-workbench .tu-chart-readout select { min-height: 44px; border: 1px solid var(--tu-line); border-radius: 8px; padding: 6px 9px; background: #fff; color: var(--tu-ink); }
.token-workbench .tu-periods { border-left: 1px solid var(--tu-line); padding-left: 25px; display: grid; align-content: center; gap: 20px; }
.token-workbench .tu-period + .tu-period { border-top: 1px solid var(--tu-line); padding-top: 18px; }
.token-workbench .tu-period small { display: block; font-size: 11px; }
.token-workbench .tu-period strong { display: block; margin: 6px 0; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; letter-spacing: -.6px; }
.token-workbench .tu-breakdown,.token-workbench .tu-recent { padding: 24px; }
.token-workbench .tu-breakdown .tu-segment { min-width: 340px; }
.token-workbench .tu-breakdown .tu-segment::before { background: #fff; }
.token-workbench .tu-table-scroll { overflow-x: auto; width: 100%; border: 1px solid var(--tu-line); border-radius: 10px; }
.token-workbench .tu-table { width: 100%; min-width: 570px; margin: 0; border-collapse: collapse; table-layout: auto; font-size: 12px; background: #fff; }
.token-workbench .tu-table th { background: #f5f6f2; font-size: 11px; font-weight: 600; color: #64695e; text-transform: none; padding: 11px 15px; text-align: left; white-space: nowrap; letter-spacing: 0; }
.token-workbench .tu-table td { padding: 14px 15px; border-top: 1px solid #eeefe9; vertical-align: middle; }
.token-workbench .tu-table tbody tr:hover { background: #fafbf7; }
.token-workbench .tu-table :is(th,td):not(:first-child) { text-align: right; }
.token-workbench .tu-table code { background: transparent; padding: 0; font-size: 11px; color: inherit; }
.token-workbench .tu-table .tu-cell-name { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-workbench .tu-table .tu-cell-cost { white-space: nowrap; font-weight: 600; }
.token-workbench .tu-cell-cost .tu-tag { margin-left: 7px; }
.token-workbench .tu-run-link { border: 0; background: #f4f4ed; color: #363c2d; padding: 10px; border-radius: 7px; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; }
.token-workbench .tu-empty { color: var(--tu-muted); padding: 30px 15px; border: 1px dashed #d9dcd2; border-radius: 10px; text-align: center; }
.token-workbench .tu-footnote { color: var(--tu-muted); margin-top: 12px; font-size: 11px; }
.token-workbench .tu-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 18px; }
.token-workbench .tu-filters label { display: grid; gap: 5px; font-size: 11px; color: var(--tu-muted); flex: 1; min-width: 140px; max-width: 240px; }
.token-workbench .tu-filters input { min-width: 0; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #dddfd5; border-radius: 9px; background: #fff; color: var(--tu-ink); }
.token-workbench .tu-recent .tu-table { min-width: 810px; }
.token-workbench .tu-pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; font-size: 12px; color: var(--tu-muted); }
.token-workbench .tu-page-controls { display: flex; gap: 6px; align-items: center; }
.token-workbench .tu-page-controls .tu-button { padding: 6px; min-width: 40px; }
.token-workbench .tu-page-controls input { width: 52px; min-height: 44px; text-align: center; border: 1px solid var(--tu-line); border-radius: 8px; }
.token-workbench .tu-details { padding: 0 20px; }
.token-workbench .tu-details summary { min-height: 50px; cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 12px; }
.token-workbench .tu-details[open] { padding-bottom: 18px; }
.token-workbench .tu-backup { display: flex; gap: 10px 20px; align-items: center; flex-wrap: wrap; padding: 13px 17px; border-radius: 10px; font-size: 11px; border: 1px solid var(--tu-line); }
.token-workbench .tu-backup .tu-backup-count { margin-left: auto; }
@media(max-width:1100px) {
  .token-workbench .tu-overview { gap: 14px; }
  .token-workbench .tu-cost { padding: 22px; }
  .token-workbench .tu-metric { padding: 20px 16px; }
  .token-workbench .tu-social { padding: 14px 16px; }
  .token-workbench .tu-trend { grid-template-columns: minmax(0,1fr) 180px; gap: 18px; }
}
@media(max-width:760px) {
  .token-workbench { padding: 20px 14px 110px; }
  .token-workbench .tu-content { gap: 14px; }
  .token-workbench h2 { font-size: 22px; }
  .token-workbench .tu-toolbar { width: 100%; gap: 8px; }
  .token-workbench .tu-toolbar .tu-segment { min-width: 0; flex: 1; }
  .token-workbench .tu-segment button { padding: 8px 6px; font-size: 12px; }
  .token-workbench .tu-overview { grid-template-columns: 1fr; }
  .token-workbench .tu-amount { font-size: 36px; letter-spacing: -1.1px; }
  .token-workbench .tu-trend { grid-template-columns: 1fr; padding: 18px; }
  .token-workbench .tu-periods { grid-template-columns: 1fr 1fr; padding: 15px 0 0; border-left: 0; border-top: 1px solid var(--tu-line); gap: 16px; }
  .token-workbench .tu-period + .tu-period { border-top: 0; border-left: 1px solid var(--tu-line); padding: 0 0 0 16px; }
  .token-workbench .tu-period strong { font-size: 19px; }
  .token-workbench .tu-chart { gap: 3px; }
  .token-workbench .tu-breakdown,.token-workbench .tu-recent { padding: 18px; }
  .token-workbench .tu-breakdown .tu-segment { min-width: 0; width: 100%; }
  .token-workbench .tu-alert { align-items: flex-start; flex-direction: column; }
  .token-workbench .tu-backup .tu-backup-count { margin-left: 0; }
  .token-workbench .tu-filters label { min-width: 100%; max-width: none; }
}
/* Local horizontal scrolling retains table semantics; undo global mobile cards. */
@media(max-width:768px) {
  .token-workbench .tu-table { display: table; }
  .token-workbench .tu-table thead { display: table-header-group; }
  .token-workbench .tu-table tbody { display: table-row-group; }
  .token-workbench .tu-table tr { display: table-row; }
  .token-workbench .tu-table :is(th,td) { display: table-cell; }
  .token-workbench .tu-table td::before { content: none; }
}
@media(prefers-reduced-motion:reduce) {
  .token-workbench .tu-segment::before,.token-workbench .tu-button,.token-workbench .tu-bar-fill { transition: none; }
  .token-workbench .tu-button:active:not(:disabled) { transform: none; }
}
