:root {
  --report-chrome-brand: 220px;
  --report-chrome-nav: 540px;
  --report-chrome-mobile-nav-height: 40px;
}

.report-chrome {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: env(safe-area-inset-top) 10px 0;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(243,246,251,.94), rgba(243,246,251,.68));
  border-bottom: 1px solid rgba(148,163,184,.10);
}

.report-chrome__inner {
  max-width: calc(var(--content) + 20px);
  margin: 0 auto;
  padding: 10px;
}

.report-chrome__bar {
  min-height: var(--header-h);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, var(--report-chrome-brand)) minmax(420px, var(--report-chrome-nav)) auto;
  align-items: center;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.82);
  box-shadow: var(--shadow-soft);
}

.report-chrome__brand {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.report-chrome__kicker {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.report-chrome__title {
  font-size: 1rem;
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-chrome__sub {
  color: var(--soft);
  font-size: .84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-chrome__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

.report-chrome__nav-link {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: -.01em;
  border: 1px solid transparent;
}

.report-chrome__nav-link.is-active {
  background: #fff;
  color: var(--text);
  border-color: rgba(148,163,184,.16);
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
}

.report-chrome__utils {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid rgba(148,163,184,.16);
}

.report-chrome__toggles {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.report-chrome .segmented {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15,23,42,.04);
}

.report-chrome .segmented button {
  min-height: 36px;
  min-width: 0;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.report-chrome .segmented button[aria-pressed="true"] {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 6px 14px rgba(15,23,42,.06);
}

.report-chrome .trm-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.82);
}

.report-chrome .trm-box label {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-chrome .trm-box input {
  width: 82px;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: right;
  font-weight: 800;
  background: transparent;
  color: var(--text);
  outline: none;
}

.report-chrome .trm-info {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(37,99,235,.1);
  color: rgb(37,99,235);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.report-chrome .trm-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15,23,42,.96);
  color: #fff;
  font-size: .78rem;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(15,23,42,.24);
  z-index: 30;
}

@media (max-width: 1100px) {
  .report-chrome__bar {
    grid-template-columns: minmax(180px, 220px) minmax(320px, 1fr);
    align-items: start;
  }

  .report-chrome__utils {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 580px) {
  .report-chrome {
    padding-top: env(safe-area-inset-top);
  }

  .report-chrome__inner {
    padding: 4px 6px;
  }

  .report-chrome__bar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 6px;
    border-radius: 14px;
  }

  .report-chrome__kicker,
  .report-chrome__sub {
    display: none;
  }

  .report-chrome__title {
    font-size: .86rem;
  }

  .report-chrome__nav {
    padding: 4px;
    gap: 4px;
    border-radius: 14px;
  }

  .report-chrome__nav-link {
    min-height: var(--report-chrome-mobile-nav-height);
    padding: 7px 8px;
    border-radius: 10px;
    font-size: .72rem;
    line-height: 1.05;
  }

  .report-chrome__utils {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(88px,auto);
    gap: 6px;
    align-items: stretch;
    padding-left: 0;
    border-left: 0;
  }

  .report-chrome__toggles {
    display: contents;
  }

  .report-chrome .segmented,
  .report-chrome .trm-box {
    width: 100%;
    min-width: 0;
  }

  .report-chrome .segmented {
    padding: 3px;
    gap: 3px;
  }

  .report-chrome .segmented button {
    min-height: 34px;
    padding: 7px 0;
    font-size: .74rem;
  }

  .report-chrome .trm-box {
    justify-content: space-between;
    padding: 4px 8px;
    gap: 6px;
  }

  .report-chrome .trm-tooltip {
    right: 0;
    left: auto;
    width: min(240px, calc(100vw - 20px));
    font-size: .74rem;
  }

  .report-chrome .trm-box label {
    font-size: .68rem;
    letter-spacing: .06em;
  }

  .report-chrome .trm-box input {
    width: 64px;
    font-size: .86rem;
  }
}
