/* Phone layout. The server marks phone browsers up front; base.html also
   switches this class on when a desktop browser becomes narrower than 760px. */
.mobile-topbar,
.mobile-nav-toggle,
.mobile-nav-close,
.mobile-nav-overlay,
.mobile-bottom-nav {
  display: none;
}

body.mobile-layout {
  font-size: 14px;
  min-width: 320px;
}

body.mobile-layout .app-shell {
  display: block;
  min-height: 100dvh;
}

body.mobile-layout .mobile-topbar {
  align-items: center;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 60px;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 80;
}

body.mobile-layout .mobile-brand {
  align-items: center;
  display: flex;
  font-size: 14px;
  gap: 9px;
}

body.mobile-layout .mobile-brand .brand-mark {
  border-radius: 9px;
  box-shadow: none;
  font-size: 16px;
  height: 31px;
  width: 31px;
}

body.mobile-layout .mobile-nav-toggle {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 42px;
  justify-content: center;
  padding: 11px 10px;
  width: 42px;
}

body.mobile-layout .mobile-nav-toggle span {
  background: var(--ink);
  border-radius: 2px;
  display: block;
  height: 2px;
  transition: opacity .18s, transform .18s;
}

body.mobile-layout.mobile-nav-open .mobile-nav-toggle span:first-child {
  transform: translateY(6px) rotate(45deg);
}

body.mobile-layout.mobile-nav-open .mobile-nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.mobile-layout.mobile-nav-open .mobile-nav-toggle span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

body.mobile-layout .sidebar {
  box-shadow: 20px 0 45px rgba(18, 22, 32, .24);
  display: flex;
  height: 100dvh;
  inset: 0 auto 0 0;
  overflow-y: auto;
  padding: 22px 18px 20px;
  position: fixed;
  transform: translateX(-105%);
  transition: transform .22s ease;
  width: min(86vw, 330px);
  z-index: 110;
}

body.mobile-layout.mobile-nav-open {
  overflow: hidden;
}

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

body.mobile-layout .mobile-nav-overlay {
  background: rgba(10, 12, 18, .42);
  border: 0;
  height: 100%;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity .22s;
  width: 100%;
  z-index: 100;
}

body.mobile-layout.mobile-nav-open .mobile-nav-overlay {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

body.mobile-layout .sidebar .brand,
body.mobile-layout .sidebar-footer,
body.mobile-layout .nav-caption {
  display: flex;
}

body.mobile-layout .sidebar .brand {
  padding: 0 9px;
}

body.mobile-layout .sidebar-footer {
  display: block;
}

body.mobile-layout .nav-list {
  flex-direction: column;
  margin-top: 30px;
  overflow: visible;
}

body.mobile-layout .nav-item {
  min-height: 43px;
  white-space: normal;
}

body.mobile-layout .mobile-nav-close {
  background: #292e3c;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: grid;
  font-size: 25px;
  font-weight: 300;
  height: 33px;
  line-height: 1;
  place-items: center;
  position: absolute;
  right: 13px;
  top: 13px;
  width: 33px;
}

body.mobile-layout .main-content {
  margin: 0;
  max-width: none;
  overflow: hidden;
  padding: 21px 16px calc(86px + env(safe-area-inset-bottom));
}

body.mobile-layout .mobile-bottom-nav {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  bottom: 0;
  box-shadow: 0 -8px 22px rgba(26, 30, 42, .05);
  display: flex;
  gap: 2px;
  justify-content: space-around;
  left: 0;
  min-height: 64px;
  padding: 7px 9px calc(7px + env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
  z-index: 70;
}

body.mobile-layout .mobile-bottom-nav a {
  align-items: center;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  flex: 1;
  flex-direction: column;
  font-size: 9px;
  font-weight: 700;
  gap: 2px;
  justify-content: center;
  line-height: 1.2;
  min-width: 0;
}

body.mobile-layout .mobile-bottom-nav a span {
  color: #858b99;
  font-size: 17px;
  line-height: 18px;
}

body.mobile-layout .mobile-bottom-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

body.mobile-layout .mobile-bottom-nav a.active span {
  color: var(--accent);
}

body.mobile-layout .page-header {
  display: block;
  margin-bottom: 20px;
}

body.mobile-layout .page-header h1,
body.mobile-layout .person-header h1 {
  font-size: 26px;
  letter-spacing: -.55px;
}

body.mobile-layout .subtitle {
  font-size: 12px;
  line-height: 1.48;
  margin-top: 7px;
}

body.mobile-layout .eyebrow {
  margin-bottom: 5px;
}

body.mobile-layout .snapshot-form {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: 15px;
}

body.mobile-layout .snapshot-form select {
  min-width: 0;
  width: 100%;
}

body.mobile-layout .freshness-strip {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin-bottom: 12px;
  padding: 11px 12px;
}

body.mobile-layout .freshness-strip .status-dot {
  margin-top: 3px;
}

body.mobile-layout .metric-grid {
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

body.mobile-layout .metric-card {
  border-radius: 12px;
  min-height: 125px;
  padding: 15px;
}

body.mobile-layout .metric-head {
  align-items: flex-start;
  gap: 6px;
}

body.mobile-layout .metric-head span,
body.mobile-layout .metric-card > span {
  font-size: 10px;
  line-height: 1.25;
}

body.mobile-layout .metric-head i {
  border-radius: 7px;
  flex: 0 0 auto;
  font-size: 13px;
  height: 24px;
  width: 24px;
}

body.mobile-layout .metric-card > strong {
  font-size: 25px;
  margin: 17px 0 7px;
}

body.mobile-layout .metric-card small {
  font-size: 9px;
  line-height: 1.35;
}

body.mobile-layout .content-grid,
body.mobile-layout .office-chart-grid {
  gap: 10px;
  grid-template-columns: 1fr;
  margin-bottom: 10px;
}

body.mobile-layout .panel {
  border-radius: 12px;
  padding: 16px;
}

body.mobile-layout .panel-header {
  gap: 10px;
  margin-bottom: 15px;
}

body.mobile-layout .panel h2 {
  font-size: 16px;
}

body.mobile-layout .chart {
  height: 250px;
}

body.mobile-layout .chart.large {
  height: 275px;
}

body.mobile-layout .office-bars {
  gap: 11px;
}

body.mobile-layout .office-bar-row {
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) 43px 48px;
}

body.mobile-layout .office-bar-row .office-name,
body.mobile-layout .office-bar-row strong {
  font-size: 11px;
}

body.mobile-layout .donut-list {
  gap: 16px;
  padding: 2px 0 13px;
}

body.mobile-layout .donut {
  height: 66px;
  width: 66px;
}

body.mobile-layout .donut:after {
  height: 48px;
  width: 48px;
}

body.mobile-layout .mini-metrics {
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mobile-layout .mini-metrics article {
  padding: 14px;
}

body.mobile-layout .mini-metrics strong {
  font-size: 20px;
}

body.mobile-layout .toolbar,
body.mobile-layout .filter-form,
body.mobile-layout .search-form {
  align-items: stretch;
  flex-direction: column;
  gap: 9px;
}

body.mobile-layout .toolbar {
  margin-bottom: 12px;
}

body.mobile-layout .filter-form select,
body.mobile-layout .filter-form input,
body.mobile-layout .search-form input {
  min-height: 44px;
  width: 100%;
}

body.mobile-layout .filter-form button,
body.mobile-layout .search-form button {
  min-height: 44px;
  padding: 10px 14px;
}

body.mobile-layout .toolbar-actions {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

body.mobile-layout .secondary-button,
body.mobile-layout .primary-button {
  min-height: 44px;
  padding: 10px 13px;
}

body.mobile-layout .selection-actions {
  gap: 8px;
}

body.mobile-layout .selection-actions > span {
  color: var(--muted);
  padding: 5px 0;
  text-align: center;
}

body.mobile-layout .metric-tabs {
  margin: 0 -16px 14px;
  overflow: auto;
  padding: 0 16px;
  scrollbar-width: none;
}

body.mobile-layout .metric-tabs::-webkit-scrollbar {
  display: none;
}

body.mobile-layout .metric-tabs a {
  flex: 0 0 auto;
  padding: 9px 12px;
}

body.mobile-layout .ranking-panel {
  padding: 0;
}

body.mobile-layout .ranking-head {
  display: none;
}

body.mobile-layout .ranking-row {
  gap: 9px;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  padding: 12px 13px;
}

body.mobile-layout .ranking-row .office-cell,
body.mobile-layout .ranking-row .profile-flags {
  display: none;
}

body.mobile-layout .rank {
  font-size: 10px;
}

body.mobile-layout .rank.podium {
  height: 25px;
  width: 25px;
}

body.mobile-layout .person-cell > i {
  flex-basis: 31px;
  font-size: 11px;
  height: 31px;
}

body.mobile-layout .person-cell strong {
  font-size: 11px;
}

body.mobile-layout .person-cell small {
  font-size: 8px;
}

body.mobile-layout .ranking-value {
  font-size: 13px;
}

body.mobile-layout .history-picker-grid,
body.mobile-layout .history-metric-row {
  gap: 14px;
  grid-template-columns: 1fr;
}

body.mobile-layout .history-filters {
  gap: 14px;
}

body.mobile-layout .picker-options {
  height: 184px;
}

body.mobile-layout .history-metric-row .primary-button {
  height: 44px;
}

body.mobile-layout .person-title {
  gap: 12px;
}

body.mobile-layout .large-avatar {
  border-radius: 14px;
  font-size: 18px;
  height: 48px;
  width: 48px;
}

body.mobile-layout .person-title > div {
  min-width: calc(100% - 62px);
}

body.mobile-layout .person-title .status-pill {
  margin-left: 60px;
}

body.mobile-layout .back-link {
  margin-bottom: 15px;
}

body.mobile-layout .office-detail-summary {
  gap: 10px;
  grid-template-columns: 1fr;
}

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

body.mobile-layout .table-panel .panel-header {
  padding: 16px 16px 0;
}

body.mobile-layout .table-scroll {
  -webkit-overflow-scrolling: touch;
  overflow: auto;
}

body.mobile-layout .table-scroll table:not([data-mobile-cards]) {
  min-width: 680px;
}

body.mobile-layout .table-scroll table[data-mobile-cards] {
  display: block;
  min-width: 0;
}

body.mobile-layout .table-scroll table[data-mobile-cards] thead {
  display: none;
}

body.mobile-layout .table-scroll table[data-mobile-cards] tbody {
  display: block;
}

body.mobile-layout .table-scroll table[data-mobile-cards] tr {
  border-bottom: 1px solid var(--line);
  display: block;
  padding: 12px 15px;
}

body.mobile-layout .table-scroll table[data-mobile-cards] tr:last-child {
  border-bottom: 0;
}

body.mobile-layout .table-scroll table[data-mobile-cards] td {
  align-items: center;
  border: 0;
  display: flex;
  font-size: 12px;
  gap: 14px;
  justify-content: space-between;
  min-height: 26px;
  padding: 5px 0;
  text-align: right;
  width: 100%;
}

body.mobile-layout .table-scroll table[data-mobile-cards] td:before {
  color: var(--muted);
  content: attr(data-label);
  flex: 0 1 45%;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}

body.mobile-layout .table-scroll table[data-mobile-cards] td.name-cell {
  font-size: 12px;
  font-weight: 700;
}

body.mobile-layout .table-scroll table[data-mobile-cards] .number-cell {
  text-align: right;
  width: 100%;
}

body.mobile-layout .table-scroll table[data-mobile-cards] .coverage-cell {
  justify-content: flex-end;
}

body.mobile-layout .pagination {
  justify-content: flex-start;
  margin-top: 12px;
  overflow: auto;
  padding-bottom: 2px;
}

body.mobile-layout .pagination a {
  flex: 0 0 auto;
  min-width: 37px;
  text-align: center;
}

body.mobile-layout .login-story {
  display: none;
}

body.mobile-layout .login-page {
  grid-template-columns: 1fr;
}

body.mobile-layout .login-panel {
  min-height: 100dvh;
  padding: 24px;
}

body.mobile-layout .login-card h2 {
  font-size: 27px;
}

@media (max-width: 430px) {
  body.mobile-layout .metric-grid,
  body.mobile-layout .mini-metrics {
    grid-template-columns: 1fr;
  }

  body.mobile-layout .metric-card {
    min-height: 116px;
  }
}
