/* Layout for the shared shell. Colors live in brand.css. */

.xq-brand {
  /* Both horizontal masters are 2400px wide with the same ink box.
     Visible A is 509px, so clear space is 255px on every side. The file
     already has L106 T111 R298 B111, which leaves 149px and 144px still to
     add on the left and the top and bottom. Right already clears.
     2549 = 2400 + 149. */
  --xq-lockup: 11.5rem;
  display: inline-block;
  width: calc(var(--xq-lockup) * 2549 / 2400);
  max-width: 100%;
  min-width: 0;
  text-decoration: none;
  vertical-align: middle;
}

.xq-auth .xq-brand {
  --xq-lockup: 20rem;
}

.xq-brand-lockup {
  display: block;
  width: calc(100% * 2400 / 2549);
  max-width: none;
  height: auto;
  margin-top: calc(100% * 144 / 2549);
  margin-bottom: calc(100% * 144 / 2549);
  margin-left: calc(100% * 149 / 2549);
  border-radius: 0;
}

.xq-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.xq-brand-name {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.xq-brand-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0.85;
}

.xq-sidebar .navbar-collapse {
  width: 100%;
}

.xq-sidebar .nav-link,
.xq-topbar .nav-link {
  font: inherit;
}

.xq-sidebar button.nav-link,
.xq-topbar button.nav-link {
  background: transparent;
  border: 0;
  color: inherit;
}

.xq-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: start;
}

.xq-sidebar .nav-link-icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.xq-sidebar .nav-link-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.xq-sidebar .dropdown-menu {
  position: static;
  padding-inline-start: 1.75rem;
}

.xq-env-badge {
  font-size: 0.68rem;
  line-height: 1.2;
  padding: 0.1rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}

.xq-sidebar .xq-mini-soon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: normal;
  cursor: default;
}

.xq-sidebar .xq-mini-soon .xq-soon {
  flex: none;
}

.xq-soon {
  margin-inline-start: auto;
  font-size: 0.68rem;
  line-height: 1.2;
  padding: 0.1rem 0.4rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}

.xq-topbar .container-xl {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.xq-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.xq-status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex: none;
}

.xq-system {
  flex: none;
  font-weight: 700;
}

.xq-company {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 575.98px) {
  .xq-topbar .container-xl {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .xq-status {
    flex-basis: 100%;
    flex-wrap: wrap;
  }

  .xq-system-picker .form-select,
  .xq-system-picker .xq-system-fixed {
    width: 100%;
  }
}

.xq-status-label {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 600;
}

.xq-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 12rem;
}

button.dropdown-item.xq-theme-toggle {
  width: 100%;
  text-align: start;
  border: 0;
}

.xq-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xq-auth {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.xq-auth .xq-brand {
  justify-content: center;
}

.xq-auth form p {
  margin-bottom: 0.85rem;
}

.xq-auth label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.xq-auth .helptext,
.xq-auth .errorlist {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.xq-auth .errorlist {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

/* Pages written for the old shell still wrap themselves in this. */
.content-wrapper {
  width: 100%;
}

/* Settings groups. Native details/summary is keyboard operable. */
.xq-settings-section {
  border: 1px solid var(--xq-border);
  border-radius: 0.5rem;
  margin-top: 0.75rem;
  background: transparent;
}

.xq-settings-section > summary {
  display: block;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  color: var(--xq-ink);
}

.xq-settings-section > summary::-webkit-details-marker {
  display: none;
}

.xq-settings-section > summary::marker {
  content: "";
}

.xq-settings-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  position: relative;
  padding-left: 1.15rem;
}

.xq-settings-section > summary .xq-settings-summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.xq-settings-section[open] > summary .xq-settings-summary::before {
  top: 0.55rem;
  transform: rotate(45deg);
}

.xq-settings-heading {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.xq-settings-note {
  flex-basis: 100%;
  font-family: var(--xq-font-body);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.xq-settings-body {
  padding: 0.15rem 1rem 1rem 2.15rem;
}

.xq-settings-section > summary:focus {
  outline: none;
}

.xq-settings-section > summary:focus-visible {
  outline: 2px solid var(--xq-focus);
  outline-offset: -2px;
}

@media (max-width: 575.98px) {
  .xq-settings-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Public Privacy and Terms. No app sidebar or company status. */
.xq-legal-page {
  min-height: 100vh;
}

.xq-legal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--xq-border);
}

.xq-legal-page .xq-brand {
  --xq-lockup: 12.5rem;
}

.xq-legal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
}

.xq-legal-wrap {
  width: min(48rem, calc(100% - 2rem));
  margin: 1.25rem auto 2rem;
}

/* Approved Privacy and Terms. Colors and headline type come from brand.css. */
.xq-legal {
  overflow-x: auto;
}

.xq-legal p,
.xq-legal li {
  line-height: 1.55;
}

.xq-legal ul,
.xq-legal ol {
  padding-left: 1.25rem;
}

.xq-legal table {
  width: 100%;
  min-width: 36rem;
  margin: 1rem 0;
  border-collapse: collapse;
}

.xq-legal th,
.xq-legal td {
  border: 1px solid var(--xq-border);
  padding: 0.5rem 0.65rem;
  vertical-align: top;
  text-align: left;
}

.xq-legal th {
  font-weight: 600;
}

.xq-legal hr {
  border: 0;
  border-top: 1px solid var(--xq-border);
  margin: 1.5rem 0;
}
