:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  color: #183336;
  background: #f3f6f5;
  --color-bg: #f3f6f5;
  --color-surface: #ffffff;
  --color-surface-subtle: #f7f9f8;
  --color-text: #183336;
  --color-muted: #5c7173;
  --color-border: #d9e3e1;
  --color-sidebar: #123c42;
  --color-sidebar-active: #22545a;
  --color-primary: #16635d;
  --color-primary-hover: #104e4a;
  --color-action: #a94d16;
  --color-action-hover: #853b10;
  --color-danger: #a43f3b;
  --color-warning-bg: #fff7e8;
  --color-warning-text: #764313;
  --color-success-bg: #e7f5ef;
  --color-success-text: #196148;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(17, 52, 56, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--color-bg);
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button,
.button-link {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.5rem 0.875rem;
  background: var(--color-action);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: var(--color-action-hover);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #73b9ad;
  outline-offset: 2px;
}

input,
select {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid #b9ccca;
  border-radius: 6px;
  padding: 0.45rem 0.625rem;
  background: #fff;
  color: var(--color-text);
}

input:hover,
select:hover {
  border-color: #8ea9a6;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-150%);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  background: #fff;
  color: var(--color-sidebar);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 1.25rem 1rem;
  background: var(--color-sidebar);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0 0.5rem;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 6px;
  background: #f0a05b;
  color: #37200e;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand div,
.sidebar-footer div {
  display: grid;
  gap: 0.05rem;
}

.brand strong {
  font-size: 1rem;
}

.brand span:last-child,
.sidebar-footer span {
  color: #bfd0d1;
  font-size: 0.72rem;
}

.primary-nav {
  display: grid;
  gap: 0.25rem;
  margin-top: 2rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: #dce8e8;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-link[aria-current="page"] {
  background: var(--color-sidebar-active);
  color: #fff;
}

.nav-icon {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  color: #9fc0bf;
  font-size: 1rem;
}

.nav-link[aria-current="page"] .nav-icon {
  color: #f2ad70;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1rem 0.5rem 0;
}

.sidebar-footer strong {
  font-size: 0.78rem;
}

.local-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #75d3a9;
  box-shadow: 0 0 0 3px rgba(117, 211, 169, 0.14);
}

.sidebar-backdrop {
  display: none;
}

.workspace {
  min-width: 0;
}

.workspace-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--color-border);
  padding: 0.625rem 2rem;
  background: rgba(255, 255, 255, 0.96);
}

.menu-button {
  display: none;
}

.icon-button {
  width: 2.5rem;
  padding: 0;
  border-color: var(--color-border);
  background: #fff;
  color: var(--color-text);
}

.icon-button:hover {
  background: var(--color-surface-subtle);
}

.page-heading {
  display: grid;
  gap: 0.05rem;
}

.page-heading h1 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.page-heading h1:focus {
  outline: none;
}

.eyebrow {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

.page-view {
  display: grid;
  gap: 1rem;
}

.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.page-intro h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
}

.page-intro p,
.panel-heading p,
.collection-action p {
  margin: 0.25rem 0 0;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.message {
  margin: 0 0 1rem;
  border: 1px solid #a9d5c4;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.message.error {
  border-color: #e4b7b4;
  background: #fff1f0;
  color: #85322f;
}

.toolbar,
.filter-panel,
.toolbar-actions {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: flex-start;
}

.filter-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.filter-panel .field {
  min-width: 9rem;
  flex: 1 1 9rem;
}

.compact-filter .field {
  max-width: 14rem;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field label {
  color: #526769;
  font-size: 0.76rem;
  font-weight: 650;
}

.searchable-select {
  position: relative;
}

.searchable-select-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.25rem);
  right: 0;
  left: 0;
  max-height: 14rem;
  overflow-y: auto;
  margin: 0;
  border: 1px solid #b9ccca;
  border-radius: 6px;
  padding: 0.25rem;
  background: var(--color-surface);
  box-shadow: 0 0.5rem 1rem rgba(17, 52, 56, 0.14);
  list-style: none;
}

.searchable-select-options [role="option"],
.searchable-select-empty {
  padding: 0.5rem 0.625rem;
  border-radius: 4px;
}

.searchable-select-options [role="option"] {
  cursor: pointer;
}

.searchable-select-options [role="option"]:hover,
.searchable-select-options [role="option"].is-active {
  background: var(--color-surface-subtle);
  color: var(--color-primary-hover);
}

.searchable-select-empty {
  color: var(--color-muted);
}

.cost-ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.cost-ranking-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cost-ranking-row {
  display: grid;
  gap: 0.35rem;
}

.cost-ranking-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--color-text);
  font-size: 0.86rem;
}

.cost-ranking-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-ranking-label strong {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.cost-ranking-bar {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-surface-subtle);
}

.cost-ranking-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
}

.button-secondary,
.button-quiet {
  border-color: #bfd0ce;
  background: #edf3f2;
  color: #234e51;
}

.button-secondary:hover,
.button-quiet:hover {
  background: #dfeae8;
}

.button-quiet {
  border-color: transparent;
  background: transparent;
}

.button-danger {
  border-color: #dfb3b0;
  background: #fff;
  color: var(--color-danger);
}

.button-danger:hover {
  background: #fff0ef;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric {
  display: grid;
  min-height: 8.25rem;
  align-content: space-between;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.metric > span {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.metric strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-variant-numeric: tabular-nums;
}

.metric small {
  color: var(--color-muted);
  font-size: 0.72rem;
}

.metric-primary {
  border-top: 3px solid var(--color-primary);
}

.metric-warning {
  border-top: 3px solid #c5772d;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.content-grid-wide {
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.8fr);
}

.overview-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.overview-filter {
  margin-bottom: 1rem;
}

.overview-custom-range {
  display: flex;
  gap: 0.75rem;
}

.overview-ranking-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.attribution-grid {
  grid-template-columns: minmax(17rem, 0.75fr) minmax(24rem, 1.25fr);
}

.collection-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.6fr);
}

.cost-trend-panel {
  min-height: 20rem;
}

.cost-trend {
  min-height: 15rem;
  overflow-x: auto;
}

#costs-results .cost-trend-panel {
  min-height: 0;
}

#cost-analysis-trend {
  min-height: 10rem;
}

.cost-trend-chart {
  display: block;
  width: 100%;
  min-width: 36rem;
  height: auto;
  overflow: visible;
}

.cost-trend-grid line {
  stroke: var(--color-border);
  stroke-width: 1;
}

.cost-trend-grid text,
.cost-trend-bar text {
  fill: var(--color-muted);
  font-size: 0.86rem;
}

.cost-trend-bar {
  cursor: default;
  outline: none;
}

.cost-trend-bar:focus rect:not(.cost-trend-bar-hitbox),
.cost-trend-bar:hover rect:not(.cost-trend-bar-hitbox) {
  filter: brightness(0.88);
}

.cost-trend-bar-hitbox {
  fill: transparent;
}

.cost-trend-tooltip {
  position: fixed;
  z-index: 10;
  min-width: 17rem;
  max-width: min(25rem, calc(100vw - 2rem));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  background: color-mix(in srgb, var(--color-surface) 96%, white);
  box-shadow: var(--shadow);
  color: var(--color-text);
  font-size: 0.86rem;
}

.cost-trend-tooltip.tooltip-right {
  transform: translateY(-50%);
}

.cost-trend-tooltip.tooltip-left {
  transform: translate(-100%, -50%);
}

.cost-trend-tooltip > strong {
  display: block;
  margin-bottom: 0.625rem;
  font-size: 0.86rem;
  text-align: center;
}

.cost-trend-tooltip ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cost-trend-tooltip li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cost-trend-tooltip li + li {
  margin-top: 0.45rem;
}

.cost-trend-tooltip li span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cost-trend-tooltip strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cost-trend-tooltip i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
}

.summary-donut {
  display: grid;
  place-items: center;
  min-height: 15rem;
}

.summary-donut-chart {
  display: grid;
  position: relative;
  width: 12rem;
  aspect-ratio: 1;
  place-items: center;
}

.summary-donut-chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.summary-donut-segment {
  cursor: default;
  transition: stroke-width 120ms ease;
}

.summary-donut-segment:hover,
.summary-donut-segment:focus {
  cursor: pointer;
  outline: none;
  stroke-width: 15;
}

.summary-donut-center {
  display: grid;
  position: relative;
  width: 69%;
  aspect-ratio: 1;
  place-items: center;
  align-content: center;
  gap: 0.35rem;
  border-radius: 50%;
  background: var(--color-surface);
  text-align: center;
}

.summary-donut-chart strong {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.summary-donut-chart span {
  color: var(--color-muted);
  font-size: 0.86rem;
}

.summary-donut-tooltip {
  display: grid;
  position: fixed;
  z-index: 10;
  transform: translate(-50%, calc(-100% - 0.5rem));
  gap: 0.2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.625rem;
  background: color-mix(in srgb, var(--color-surface) 96%, white);
  box-shadow: var(--shadow);
  color: var(--color-muted);
  font-size: 0.78rem;
  text-align: center;
}

.summary-donut-tooltip strong {
  color: var(--color-text);
  font-size: 0.82rem;
}

.summary-donut-tooltip span {
  color: var(--color-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary-table-wrap {
  overflow-x: auto;
}

.summary-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.76rem;
}

.summary-table th,
.summary-table td {
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  padding: 0.625rem 0.125rem;
  text-overflow: ellipsis;
  text-align: right;
  white-space: nowrap;
}

.summary-table th {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.summary-table th:first-child,
.summary-table td:first-child {
  width: 39%;
  text-align: left;
}

.summary-table tr:last-child td {
  border-bottom: 0;
}

.summary-table a {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.25rem;
  color: inherit;
  text-decoration: none;
}

.summary-table a:hover span,
.summary-table a:focus-visible span {
  color: var(--color-primary);
  text-decoration: underline;
}

.summary-table a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-color {
  width: 0.625rem;
  height: 0.625rem;
  flex: 0 0 auto;
  border-radius: 999px;
}

.comparison {
  font-variant-numeric: tabular-nums;
}

.comparison-up,
.comparison-new {
  color: #c54b43;
}

.comparison-down {
  color: #25865f;
}

.comparison-flat {
  color: var(--color-muted);
}

.panel {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-panel .panel-heading {
  padding: 1rem;
}

.panel-heading,
.collection-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading {
  margin-bottom: 0.875rem;
}

.panel-heading h3,
.collection-action h3 {
  margin: 0;
  font-size: 0.95rem;
}

.panel-heading a {
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.panel-heading a:hover {
  text-decoration: underline;
}

.distribution-list {
  display: grid;
  gap: 0.875rem;
}

.distribution-row {
  display: grid;
  gap: 0.35rem;
}

.distribution-label,
.project-breakdown li,
.info-list div,
.provider-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.distribution-label {
  align-items: baseline;
  font-size: 0.84rem;
}

.distribution-label span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

progress {
  width: 100%;
  height: 0.4rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e8efee;
  color: var(--color-primary);
  appearance: none;
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #e8efee;
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: currentColor;
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: currentColor;
}

.distribution-row.warning progress {
  color: #c5772d;
}

.project-breakdown {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0 0 0 0.75rem;
  color: var(--color-muted);
  font-size: 0.75rem;
  list-style: none;
}

.summary-strip {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--color-border);
  padding: 0.25rem 0 0.75rem;
}

.summary-strip div {
  display: grid;
  gap: 0.1rem;
}

.summary-strip span {
  color: var(--color-muted);
  font-size: 0.74rem;
}

.summary-strip strong {
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  border-bottom: 1px solid #e6eceb;
  padding: 0.72rem 0.875rem;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--color-surface-subtle);
  color: #526769;
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

tbody tr:hover {
  background: #fafcfb;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td small {
  display: block;
  margin-top: 0.2rem;
  color: var(--color-muted);
}

.number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.badge,
.status-badge {
  padding: 0.2rem 0.5rem;
}

.badge-ok,
.run-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.badge-warn,
.run-running {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.run-failed,
.run-partial_failed,
.run-canceled {
  background: #fff0ef;
  color: #85322f;
}

.loading-state,
.empty-state {
  width: 100%;
  padding: 1.5rem 0.75rem;
  color: var(--color-muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--color-text);
}

.tabs {
  display: flex;
  gap: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.tab-button {
  min-height: 2.75rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.5rem 0.125rem;
  background: transparent;
  color: var(--color-muted);
}

.tab-button:hover {
  background: transparent;
  color: var(--color-text);
}

.tab-button[aria-selected="true"] {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary);
}

.stack-form {
  display: grid;
  gap: 0.75rem;
}

.stack-form button {
  justify-self: start;
}

.divider {
  height: 1px;
  margin: 1.25rem 0;
  background: var(--color-border);
}

.hierarchy {
  display: grid;
  gap: 0.75rem;
}

.group-block {
  border: 1px solid var(--color-border);
  border-radius: 7px;
  padding: 0.875rem;
  background: var(--color-surface-subtle);
}

.rename-form,
.binding-form {
  display: flex;
  align-items: end;
  gap: 0.5rem;
}

.rename-form .field,
.binding-form .field {
  min-width: 0;
  flex: 1;
}

dialog {
  width: min(calc(100% - 2rem), 28rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1.5rem 3rem rgba(17, 52, 56, 0.22);
}

dialog::backdrop {
  background: rgba(18, 60, 66, 0.42);
}

.dialog-form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
}

.dialog-heading h3,
.dialog-heading p {
  margin: 0;
}

.dialog-heading p {
  margin-top: 0.35rem;
  color: var(--color-muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.project-list,
.provider-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-list {
  margin-top: 0.75rem;
  padding-left: 1rem;
}

.project-list li {
  border-top: 1px solid var(--color-border);
  padding-top: 0.65rem;
}

.binding-form {
  min-width: 19rem;
}

.collection-action {
  align-items: end;
}

.provider-list > li {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.75rem;
}

.provider-row {
  align-items: center;
}

.provider-name {
  font-weight: 700;
}

.account-list {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}

.account-chip {
  border-radius: 4px;
  padding: 0.18rem 0.4rem;
  background: #edf3f2;
  color: #466164;
  font-size: 0.72rem;
}

.info-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.info-list div {
  border-bottom: 1px solid #e6eceb;
  padding: 0.625rem 0;
}

.info-list div:last-child {
  border-bottom: 0;
}

.info-list dt {
  color: var(--color-muted);
}

.info-list dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}

code {
  color: #28595d;
  font-size: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid-wide,
  .attribution-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .overview-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-ranking-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    width: min(17rem, calc(100vw - 3rem));
    transition: transform 160ms ease;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(11, 31, 34, 0.48);
  }

  .sidebar-backdrop:hover {
    background: rgba(11, 31, 34, 0.48);
  }

  .menu-button {
    display: inline-flex;
  }

  .workspace-header {
    gap: 0.75rem;
    padding-inline: 1rem;
  }

  .content {
    padding-inline: 1rem;
  }
}

@media (max-width: 640px) {
  .workspace-header {
    min-height: 4rem;
  }

  .content {
    padding-top: 1rem;
  }

  .page-intro,
  .collection-action,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-intro .button-link {
    align-self: flex-start;
  }

  .metric-grid,
  .content-grid,
  .settings-grid,
  .overview-ranking-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .filter-panel,
  .overview-custom-range,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .field,
  .filter-panel .field,
  .compact-filter .field {
    width: 100%;
    max-width: none;
  }

  .summary-strip {
    justify-content: space-between;
    gap: 1rem;
  }

  .cost-trend-tooltip,
  .cost-trend-tooltip.tooltip-left,
  .cost-trend-tooltip.tooltip-right {
    position: static;
    margin-top: 0.75rem;
    transform: none;
  }

  .summary-table {
    min-width: 21rem;
    table-layout: auto;
    font-size: 0.72rem;
  }

  .summary-table th,
  .summary-table td {
    overflow: visible;
    padding: 0.625rem 0.25rem;
    text-overflow: clip;
  }

  .summary-table th:first-child,
  .summary-table td:first-child {
    width: auto;
  }

  .summary-table a {
    min-width: 7.5rem;
    gap: 0.45rem;
  }

  .rename-form,
  .binding-form {
    min-width: 15rem;
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .project-list {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
